Top Description Fields Constructors Methods
com.ning.compress.lzf.impl

public Class VanillaChunkDecoder

extends ChunkDecoder
Class Inheritance
Imports
java.io.IOException, .InputStream, com.ning.compress.lzf.*

Safe ChunkDecoder implementation that can be used on any platform.

Field Summary

Inherited from com.ning.compress.lzf.ChunkDecoder:
BYTE_NULLHEADER_BYTES

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static final void
copyUpTo32WithSwitch(byte[] in, int inPos, byte[] out, int outPos, int lengthMinusOne)

public final int
decodeChunk(final InputStream
An input stream of LZF compressed bytes
is
,
final byte[]
A byte array used as a scratch area.
inputBuffer
,
final byte[]
A byte array in which the result is returned
outputBuffer
)

Implements abstract com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Main decode from a stream.
public final void
decodeChunk(byte[] in, int inPos, byte[] out, int outPos, int outEnd)

Implements abstract com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Main decode method for individual chunks.
public int
skipOrDecodeChunk(final InputStream is, final byte[] inputBuffer, final byte[] outputBuffer, final long maxToSkip)

Implements abstract com.ning.compress.lzf.ChunkDecoder.skipOrDecodeChunk.

Inherited from com.ning.compress.lzf.ChunkDecoder:
_reportArrayOverflow_reportCorruptHeadercalculateUncompressedSizedecodedecodedecodedecodereadFullyreadHeaderskipFullyuint16

Constructor Detail

VanillaChunkDecoderback to summary
public VanillaChunkDecoder()

Method Detail

copyUpTo32WithSwitchback to summary
protected static final void copyUpTo32WithSwitch(byte[] in, int inPos, byte[] out, int outPos, int lengthMinusOne)
decodeChunkback to summary
public final int decodeChunk(final InputStream is, final byte[] inputBuffer, final byte[] outputBuffer) throws IOException

Implements abstract com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Doc from com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Main decode from a stream. Decompressed bytes are placed in the outputBuffer, inputBuffer is a "scratch-area".

Parameters
is:InputStream

An input stream of LZF compressed bytes

inputBuffer:byte[]

A byte array used as a scratch area.

outputBuffer:byte[]

A byte array in which the result is returned

Returns:int

The number of bytes placed in the outputBuffer.

Annotations
@Override
decodeChunkback to summary
public final void decodeChunk(byte[] in, int inPos, byte[] out, int outPos, int outEnd) throws LZFException

Implements abstract com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Doc from com.ning.compress.lzf.ChunkDecoder.decodeChunk.

Main decode method for individual chunks.

Annotations
@Override
skipOrDecodeChunkback to summary
public int skipOrDecodeChunk(final InputStream is, final byte[] inputBuffer, final byte[] outputBuffer, final long maxToSkip) throws IOException

Implements abstract com.ning.compress.lzf.ChunkDecoder.skipOrDecodeChunk.

Returns:int

Doc from com.ning.compress.lzf.ChunkDecoder.skipOrDecodeChunk.

If positive number, number of bytes skipped; if -1, end-of-stream was reached; otherwise, amount of content decoded (using formula of returnValue = -(decodedAmount + 2))

Annotations
@Override