com.izforge.izpack.compressor
Class DefaultPackCompressor
java.lang.Object
com.izforge.izpack.compressor.PackCompressorBase
com.izforge.izpack.compressor.DefaultPackCompressor
- All Implemented Interfaces:
- PackCompressor
- public class DefaultPackCompressor
- extends PackCompressorBase
IzPack will be able to support different compression methods for the
packs included in the installation jar file.
This class implements the PackCompressor for the compression format "default"
which is current the LZ77 implementation of zlib (also known as
zip or deflate).
- Author:
- Klaus Bartz
Method Summary |
java.io.OutputStream |
getOutputStream(java.io.OutputStream os)
Returns a newly created output stream which write method
writes the given input encoded to the defined output stream. |
boolean |
needsBufferedOutputStream()
Returns whether a buffered output stream should be used
intermediate between the output stream of this compressor
and the destination. |
boolean |
useStandardCompression()
Returns whether the standard comression should be used with
this pack compressor or not. |
Methods inherited from class com.izforge.izpack.compressor.PackCompressorBase |
getCompressionFormatSymbols, getCompressionLevel, getContainerPaths, getDecoderClassNames, getDecoderMapperName, getEncoderClassName, getOutputInstance, loadClass, resolveConstructorParams, setCompiler, setCompressionLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THIS_FORMAT_NAMES
private static final java.lang.String[] THIS_FORMAT_NAMES
THIS_CONTAINER_PATH
private static final java.lang.String[] THIS_CONTAINER_PATH
THIS_DECODER_MAPPER
private static final java.lang.String THIS_DECODER_MAPPER
THIS_DECODER_CLASS_NAMES
private static final java.lang.String[][] THIS_DECODER_CLASS_NAMES
THIS_ENCODER_CLASS_NAME
private static final java.lang.String THIS_ENCODER_CLASS_NAME
DefaultPackCompressor
public DefaultPackCompressor()
getOutputStream
public java.io.OutputStream getOutputStream(java.io.OutputStream os)
- Description copied from interface:
PackCompressor
- Returns a newly created output stream which write method
writes the given input encoded to the defined output stream.
Attention! This method will be returned a valid output stream
only if it is used in the IzPack compiler, or if this pack compressor
needs no external classes. A call in the
installation should be throw if external classes are used.
The implementation should load the needed classes via reflection
because classes are not present in the installation.
- Parameters:
os
- output stream to be used as listener
- Returns:
- a newly created encoding output stream
useStandardCompression
public boolean useStandardCompression()
- Description copied from interface:
PackCompressor
- Returns whether the standard comression should be used with
this pack compressor or not. If this method returns true,
the returns values of the methods getContainerPath and
getDecoderClassNames are not valid (should be null).
- Specified by:
useStandardCompression
in interface PackCompressor
- Overrides:
useStandardCompression
in class PackCompressorBase
needsBufferedOutputStream
public boolean needsBufferedOutputStream()
- Description copied from interface:
PackCompressor
- Returns whether a buffered output stream should be used
intermediate between the output stream of this compressor
and the destination.
- Specified by:
needsBufferedOutputStream
in interface PackCompressor
- Overrides:
needsBufferedOutputStream
in class PackCompressorBase