org.at4j.zip.comp
Class ShrunkCompressionMethod

java.lang.Object
  extended by org.at4j.zip.comp.AbstractUnsupportedCompressionMethod
      extended by org.at4j.zip.comp.ShrunkCompressionMethod
All Implemented Interfaces:
ZipEntryCompressionMethod, ZipEntryCompressionMethodFactory

public class ShrunkCompressionMethod
extends AbstractUnsupportedCompressionMethod
implements ZipEntryCompressionMethodFactory

This is the "Shrunk" compression method. It is not supported.

This class cannot be instantiated. Use the singleton instance INSTANCE instead.

Since:
1.0
Author:
Karl Gustafsson

Field Summary
static UnsignedShort CODE
          The unique code for this compression method.
static ShrunkCompressionMethod INSTANCE
          Singleton instance.
static String NAME
           
static UnsignedShort VERSION_NEEDED_TO_EXTRACT
          The PK-Zip version needed to extract entries compressed with this compression method.
 
Method Summary
 ShrunkCompressionMethod create(ZipGeneralPurposeBitFlags gbBitFlags)
          Create a compression method instance.
 UnsignedShort getCode()
          Get the unique code identifying this compression method.
 String getName()
          Get a human-readable name for the compression method.
 UnsignedShort getVersionNeededToExtract()
          Get the PK-Zip version needed to extract Zip entries compressed by this compression method.
 String toString()
           
 
Methods inherited from class org.at4j.zip.comp.AbstractUnsupportedCompressionMethod
createInputStream, createOutputStream, createRandomAccess, createWithCompressionLevel, isRandomAccessSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CODE

public static final UnsignedShort CODE
The unique code for this compression method. The code is used in the Zip entry's header to specify the compression method that is used for compressing the entry's file data.


NAME

public static final String NAME
See Also:
Constant Field Values

VERSION_NEEDED_TO_EXTRACT

public static final UnsignedShort VERSION_NEEDED_TO_EXTRACT
The PK-Zip version needed to extract entries compressed with this compression method. See ZipEntryCompressionMethod.getVersionNeededToExtract().


INSTANCE

public static final ShrunkCompressionMethod INSTANCE
Singleton instance. This is used instead of instantiating this class.

Method Detail

getCode

public UnsignedShort getCode()
Description copied from interface: ZipEntryCompressionMethodFactory
Get the unique code identifying this compression method.

Specified by:
getCode in interface ZipEntryCompressionMethod
Specified by:
getCode in interface ZipEntryCompressionMethodFactory
Returns:
The unique code identifying this compression method.

getName

public String getName()
Description copied from interface: ZipEntryCompressionMethod
Get a human-readable name for the compression method.

Specified by:
getName in interface ZipEntryCompressionMethod
Returns:
The compression method's name.

getVersionNeededToExtract

public UnsignedShort getVersionNeededToExtract()
Description copied from interface: ZipEntryCompressionMethod
Get the PK-Zip version needed to extract Zip entries compressed by this compression method.

Specified by:
getVersionNeededToExtract in interface ZipEntryCompressionMethod
Returns:
An UnsignedShort representing the version number. 10 corresponds to version 1.0, 62 to 6.2, etc.

create

public ShrunkCompressionMethod create(ZipGeneralPurposeBitFlags gbBitFlags)
Description copied from interface: ZipEntryCompressionMethodFactory
Create a compression method instance.

Specified by:
create in interface ZipEntryCompressionMethodFactory
Parameters:
gbBitFlags - The Zip entry's general purpose bit flags. They may contain compression algorithm parameters.
Returns:
The Zip entry compression method.

toString

public String toString()
Overrides:
toString in class Object