org.at4j.zip.comp
Class ZipEntryCompressionMethodRegistry
java.lang.Object
org.at4j.zip.comp.ZipEntryCompressionMethodRegistry
public class ZipEntryCompressionMethodRegistry
- extends Object
This is a registry where factory objects for the different
ZipEntryCompressionMethod
:s that may occur in a Zip file are
registered.
By default, the registry knows about only the compression methods that are
currently supported.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
ZipEntryCompressionMethodFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipEntryCompressionMethodRegistry
public ZipEntryCompressionMethodRegistry()
registerCompressionMethodFactory
public void registerCompressionMethodFactory(ZipEntryCompressionMethodFactory f)
- Register a new compression method.
- Parameters:
f
- The compression method factory.
forCode
public ZipEntryCompressionMethodFactory forCode(UnsignedShort code)
throws UnknownZipEntryCompressionMethodException
- Get the
ZipEntryCompressionMethodFactory
that creates compression
method objects corresponding to the supplied code. The code is the code
identifying the compression method in a Zip entry's header.
- Parameters:
code
- The code for the compression method.
- Returns:
- The compression method factory.
- Throws:
UnknownZipEntryCompressionMethodException
- If no compression
method is registered for the supplied code.