|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.compressor.PackCompressorBase
public abstract class PackCompressorBase
IzPack will be able to support different compression methods for the packs included in the installation jar file. This abstract class implements the interface PackCompressor for the common needed methods.
| Field Summary | |
|---|---|
private Compiler |
compiler
|
private java.lang.reflect.Constructor<java.lang.Object> |
constructor
|
protected java.lang.String[] |
containerPaths
|
protected java.lang.String[][] |
decoderClassNames
Should contain all full qualified (use dots, not slashes) names of the class files. |
protected java.lang.String |
decoderMapper
|
protected java.lang.String |
encoderClassName
|
protected java.lang.String[] |
formatNames
|
private int |
level
|
protected java.lang.Class[] |
paramsClasses
|
| Constructor Summary | |
|---|---|
PackCompressorBase()
|
|
| Method Summary | |
|---|---|
java.lang.String[] |
getCompressionFormatSymbols()
Returns all symbolic names which are used for this compressor. |
int |
getCompressionLevel()
Returns the compression level to be used. |
java.lang.String[] |
getContainerPaths()
Returns the path where the compiler can find the classes; normaly this is a path to a jar file. |
java.lang.String[][] |
getDecoderClassNames()
Returns the qualified names of all needed classes for decoding. |
java.lang.String |
getDecoderMapperName()
Returns the qualified name of the class which should be used as InputStream in the installer. |
java.lang.String |
getEncoderClassName()
Returns the qualified name of the encoding output stream. |
protected java.io.OutputStream |
getOutputInstance(java.io.OutputStream slave)
Returns a newly created instance of the output stream which should be used by this pack compressor. |
void |
loadClass(java.lang.String className)
Loads the given class from the previos setted container paths. |
boolean |
needsBufferedOutputStream()
Returns whether a buffered output stream should be used intermediate between the output stream of this compressor and the destination. |
protected java.lang.Object[] |
resolveConstructorParams(java.io.OutputStream slave)
This method will be used to support different constructor signatures. |
void |
setCompiler(Compiler compiler)
Receives the current used compiler. |
void |
setCompressionLevel(int level)
Receives the compression level to be used. |
boolean |
useStandardCompression()
Returns whether the standard comression should be used with this pack compressor or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.izforge.izpack.compressor.PackCompressor |
|---|
getOutputStream |
| Field Detail |
|---|
protected java.lang.String[] formatNames
protected java.lang.String[] containerPaths
protected java.lang.String decoderMapper
protected java.lang.String[][] decoderClassNames
String.match. "org.apache.tools.bzip2.CBZip2InputStream.*"Do not forget the dot before the asterix. For an other example see class BZip2PackCompressor.
protected java.lang.String encoderClassName
protected java.lang.Class[] paramsClasses
private Compiler compiler
private java.lang.reflect.Constructor<java.lang.Object> constructor
private int level
| Constructor Detail |
|---|
public PackCompressorBase()
| Method Detail |
|---|
public java.lang.String[] getContainerPaths()
PackCompressor
getContainerPaths in interface PackCompressorpublic java.lang.String getEncoderClassName()
PackCompressor
getEncoderClassName in interface PackCompressorpublic java.lang.String[][] getDecoderClassNames()
PackCompressor
getDecoderClassNames in interface PackCompressorpublic boolean useStandardCompression()
PackCompressor
useStandardCompression in interface PackCompressorpublic java.lang.String[] getCompressionFormatSymbols()
PackCompressor
getCompressionFormatSymbols in interface PackCompressorpublic java.lang.String getDecoderMapperName()
PackCompressor
getDecoderMapperName in interface PackCompressorpublic void setCompiler(Compiler compiler)
PackCompressor
setCompiler in interface PackCompressorcompiler - current active compilerpublic void setCompressionLevel(int level)
PackCompressor
setCompressionLevel in interface PackCompressorlevel - compression level to be usedpublic int getCompressionLevel()
PackCompressor
getCompressionLevel in interface PackCompressorpublic boolean needsBufferedOutputStream()
PackCompressor
needsBufferedOutputStream in interface PackCompressor
public void loadClass(java.lang.String className)
throws java.lang.Exception
className - full qualified name of the class to be loaded
java.lang.Exception
protected java.io.OutputStream getOutputInstance(java.io.OutputStream slave)
throws java.lang.Exception
slave - output stream to be used as slave
java.lang.Exception
protected java.lang.Object[] resolveConstructorParams(java.io.OutputStream slave)
throws java.lang.Exception
XXXOutputStream( OutputStream slave )if level is -1 or
XXXOutputStream( OutputStream slave, int level )if level is other than -1.
slave - output stream to be used as slave
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||