Top Description Fields Constructors Methods
org.apache.commons.compress.archivers.zip

pack-priv final Class UnshrinkingInputStream

extends LZWInputStream
Class Inheritance
Imports
java.io.IOException, .InputStream, java.nio.ByteOrder, org.apache.commons.compress.compressors.lzw.LZWInputStream

Input stream that decompresses ZIP method 1 (unshrinking). A variation of the LZW algorithm, with some twists.
Since
1.7

Field Summary

Modifier and TypeField and Description
private final boolean[]
private static final int
private static final int
Inherited from org.apache.commons.compress.compressors.lzw.LZWInputStream:
DEFAULT_CODE_SIZEinUNUSED_PREFIX

Constructor Summary

AccessConstructor and Description
pack-priv
UnshrinkingInputStream(final InputStream inputStream)

IOException is not actually thrown!

Method Summary

Modifier and TypeMethod and Description
protected int
addEntry(final int
the previous code
previousCode
,
final byte
the next character to append
character
)

Implements abstract org.apache.commons.compress.compressors.lzw.LZWInputStream.addEntry.

Add a new entry to the dictionary.
protected int
private void
Inherited from org.apache.commons.compress.compressors.lzw.LZWInputStream:
addEntryaddRepeatOfPreviousCodecloseexpandCodeToOutputStackgetClearCodegetCodeSizegetCompressedCountgetPrefixgetPrefixesLengthgetTableSizeincrementCodeSizeinitializeTablesinitializeTablesreadreadreadNextCoderesetCodeSizeresetPreviousCodesetClearCodesetCodeSizesetPrefixsetTableSize

Field Detail

isUsedback to summary
private final boolean[] isUsed
MAX_CODE_SIZEback to summary
private static final int MAX_CODE_SIZE
MAX_TABLE_SIZEback to summary
private static final int MAX_TABLE_SIZE

Constructor Detail

UnshrinkingInputStreamback to summary
pack-priv UnshrinkingInputStream(final InputStream inputStream)

IOException is not actually thrown!

Method Detail

addEntryback to summary
protected int addEntry(final int previousCode, final byte character) throws IOException

Implements abstract org.apache.commons.compress.compressors.lzw.LZWInputStream.addEntry.

Doc from org.apache.commons.compress.compressors.lzw.LZWInputStream.addEntry.

Add a new entry to the dictionary.

Parameters
previousCode:int

the previous code

character:byte

the next character to append

Returns:int

the new code

Annotations
@Override
Exceptions
IOException:
on error
decompressNextSymbolback to summary
protected int decompressNextSymbol() throws IOException

Implements abstract org.apache.commons.compress.compressors.lzw.LZWInputStream.decompressNextSymbol.

Doc from org.apache.commons.compress.compressors.lzw.LZWInputStream.decompressNextSymbol.

Read the next code and expand it.

Returns:int

the expanded next code, negative on EOF

Annotations
@Override
Exceptions
IOException:
on error
partialClearback to summary
private void partialClear()