|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.compressor.PackCompressorFactory
public class PackCompressorFactory
IzPack will be able to support different compression methods for the packs included in the installation jar file. This class is the factory which offers different "compressors" to IzPack. It is made to mask the internal structure of each "compressor" and gaves a common API for all supported compression methods to IzPack. IzPacks compiler uses this class to get an encoder and the informations which are needed to support the decompression in the installation. All "compressors" should use this class as API and should not be included directly in the IzPack compiler.
Field Summary | |
---|---|
private static CompilerException |
ShitHappens
|
private static java.util.HashMap<java.lang.String,PackCompressor> |
typeMap
This map contains all registered "compressors". |
Constructor Summary | |
---|---|
private |
PackCompressorFactory()
No object of this factory needed. |
Method Summary | |
---|---|
static void |
cachedRegister(PackCompressor pc)
Register a particular pack compressor to this factory. |
static PackCompressor |
get(java.lang.String type)
Returns a newly created pack compressor with the given compression format. |
static CompilerException |
getRegisterException()
Returns the exception which was thrown during registering of a pack compressor. |
static boolean |
good()
|
static boolean |
isTypeSupported(java.lang.String type)
Returns whether a compressor exists for the given symbolic name or not. |
static void |
register(PackCompressor pc)
Register a particular pack compressor to this factory. |
static void |
setRegisterException(CompilerException registerException)
Sets an exception which was thrown during registering a pack compressor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.HashMap<java.lang.String,PackCompressor> typeMap
private static CompilerException ShitHappens
Constructor Detail |
---|
private PackCompressorFactory()
Method Detail |
---|
public static void cachedRegister(PackCompressor pc)
pc
- an instance of the pack compressor which describes
encoder and decoder for a special compression formatpublic static void register(PackCompressor pc) throws CompilerException
pc
- an instance of the pack compressor which describes
encoder and decoder for a special compression format
CompilerException
- if the symbol already exist or if
the compressor is not validpublic static boolean isTypeSupported(java.lang.String type) throws CompilerException
type
- symbolic compression name to be tested
CompilerException
public static PackCompressor get(java.lang.String type) throws CompilerException
type
- symbol name of compression format to be used
CompilerException
- if no encoder is registered for
the chosen compression formatpublic static CompilerException getRegisterException()
public static void setRegisterException(CompilerException registerException)
registerException
- The register exception to set.public static boolean good()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |