public abstract class PackCompressorBase extends java.lang.Object implements PackCompressor
| Modifier and Type | Field and Description |
|---|---|
private Compiler |
compiler |
private java.lang.reflect.Constructor |
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 and Description |
|---|
PackCompressorBase() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOutputStreamprotected 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 constructor
private int level
public java.lang.String[] getContainerPaths()
PackCompressorgetContainerPaths in interface PackCompressorpublic java.lang.String getEncoderClassName()
PackCompressorgetEncoderClassName in interface PackCompressorpublic java.lang.String[][] getDecoderClassNames()
PackCompressorgetDecoderClassNames in interface PackCompressorpublic boolean useStandardCompression()
PackCompressoruseStandardCompression in interface PackCompressorpublic java.lang.String[] getCompressionFormatSymbols()
PackCompressorgetCompressionFormatSymbols in interface PackCompressorpublic java.lang.String getDecoderMapperName()
PackCompressorgetDecoderMapperName in interface PackCompressorpublic void setCompiler(Compiler compiler)
PackCompressorsetCompiler in interface PackCompressorcompiler - current active compilerpublic void setCompressionLevel(int level)
PackCompressorsetCompressionLevel in interface PackCompressorlevel - compression level to be usedpublic int getCompressionLevel()
PackCompressorgetCompressionLevel in interface PackCompressorpublic boolean needsBufferedOutputStream()
PackCompressorneedsBufferedOutputStream in interface PackCompressorpublic void loadClass(java.lang.String className)
throws java.lang.Exception
className - full qualified name of the class to be loadedjava.lang.Exceptionprotected java.io.OutputStream getOutputInstance(java.io.OutputStream slave)
throws java.lang.Exception
slave - output stream to be used as slavejava.lang.Exceptionprotected 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 slavejava.lang.Exception