public abstract class PackCompressorBase extends Object implements PackCompressor
Modifier and Type | Field and Description |
---|---|
private Compiler |
compiler |
private Constructor |
constructor |
protected String[] |
containerPaths |
protected String[][] |
decoderClassNames
Should contain all full qualified (use dots, not slashes)
names of the class files.
|
protected String |
decoderMapper |
protected String |
encoderClassName |
protected String[] |
formatNames |
private int |
level |
protected Class[] |
paramsClasses |
Constructor and Description |
---|
PackCompressorBase() |
Modifier and Type | Method and Description |
---|---|
String[] |
getCompressionFormatSymbols()
Returns all symbolic names which are used for this compressor.
|
int |
getCompressionLevel()
Returns the compression level to be used.
|
String[] |
getContainerPaths()
Returns the path where the compiler can find the classes;
normaly this is a path to a jar file.
|
String[][] |
getDecoderClassNames()
Returns the qualified names of all needed classes for decoding.
|
String |
getDecoderMapperName()
Returns the qualified name of the class which should be used
as InputStream in the installer.
|
String |
getEncoderClassName()
Returns the qualified name of the encoding output stream.
|
protected OutputStream |
getOutputInstance(OutputStream slave)
Returns a newly created instance of the output stream which should be
used by this pack compressor.
|
void |
loadClass(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 Object[] |
resolveConstructorParams(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, wait
getOutputStream
protected String[] formatNames
protected String[] containerPaths
protected String decoderMapper
protected 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 String encoderClassName
protected Class[] paramsClasses
private Constructor constructor
private int level
public PackCompressorBase()
public String[] getContainerPaths()
PackCompressor
getContainerPaths
in interface PackCompressor
public String getEncoderClassName()
PackCompressor
getEncoderClassName
in interface PackCompressor
public String[][] getDecoderClassNames()
PackCompressor
getDecoderClassNames
in interface PackCompressor
public boolean useStandardCompression()
PackCompressor
useStandardCompression
in interface PackCompressor
public String[] getCompressionFormatSymbols()
PackCompressor
getCompressionFormatSymbols
in interface PackCompressor
public String getDecoderMapperName()
PackCompressor
getDecoderMapperName
in interface PackCompressor
public void setCompiler(Compiler compiler)
PackCompressor
setCompiler
in interface PackCompressor
compiler
- current active compilerpublic void setCompressionLevel(int level)
PackCompressor
setCompressionLevel
in interface PackCompressor
level
- compression level to be usedpublic int getCompressionLevel()
PackCompressor
getCompressionLevel
in interface PackCompressor
public boolean needsBufferedOutputStream()
PackCompressor
needsBufferedOutputStream
in interface PackCompressor
public void loadClass(String className) throws Exception
className
- full qualified name of the class to be loadedException
protected OutputStream getOutputInstance(OutputStream slave) throws Exception
slave
- output stream to be used as slaveException
protected Object[] resolveConstructorParams(OutputStream slave) throws 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 slaveException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses