public class AsyncBlockCompressedInputStream extends BlockCompressedInputStream
BlockCompressedInputStream
.
Note that this implementation is not synchronized. If multiple threads access an instance concurrently, it must be synchronized externally.BlockCompressedInputStream.DecompressedBlock, BlockCompressedInputStream.FileTermination
CANNOT_SEEK_CLOSED_STREAM_MSG, CANNOT_SEEK_STREAM_MSG, INCORRECT_HEADER_SIZE_MSG, INVALID_FILE_PTR_MSG, PREMATURE_END_MSG, UNEXPECTED_BLOCK_LENGTH_MSG
Constructor and Description |
---|
AsyncBlockCompressedInputStream(java.io.File file) |
AsyncBlockCompressedInputStream(java.io.File file,
InflaterFactory inflaterFactory) |
AsyncBlockCompressedInputStream(java.io.InputStream stream) |
AsyncBlockCompressedInputStream(java.io.InputStream stream,
InflaterFactory inflaterFactory) |
AsyncBlockCompressedInputStream(SeekableStream strm) |
AsyncBlockCompressedInputStream(SeekableStream strm,
InflaterFactory inflaterFactory) |
AsyncBlockCompressedInputStream(java.net.URL url) |
AsyncBlockCompressedInputStream(java.net.URL url,
InflaterFactory inflaterFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying InputStream or RandomAccessFile
|
protected BlockCompressedInputStream.DecompressedBlock |
nextBlock(byte[] bufferAvailableForReuse)
Reads and decompresses the next block
|
protected void |
prepareForSeek()
Performs cleanup required before seek is called on the underlying stream
|
assertNonDefectiveFile, available, checkTermination, checkTermination, checkTermination, endOfBlock, getFileBlock, getFilePointer, getPosition, isValidFile, processNextBlock, read, read, read, readLine, seek, setCheckCrcs
public AsyncBlockCompressedInputStream(java.io.InputStream stream)
public AsyncBlockCompressedInputStream(java.io.InputStream stream, InflaterFactory inflaterFactory)
public AsyncBlockCompressedInputStream(java.io.File file) throws java.io.IOException
java.io.IOException
public AsyncBlockCompressedInputStream(java.io.File file, InflaterFactory inflaterFactory) throws java.io.IOException
java.io.IOException
public AsyncBlockCompressedInputStream(java.net.URL url)
public AsyncBlockCompressedInputStream(java.net.URL url, InflaterFactory inflaterFactory)
public AsyncBlockCompressedInputStream(SeekableStream strm)
public AsyncBlockCompressedInputStream(SeekableStream strm, InflaterFactory inflaterFactory)
protected BlockCompressedInputStream.DecompressedBlock nextBlock(byte[] bufferAvailableForReuse)
BlockCompressedInputStream
nextBlock
in class BlockCompressedInputStream
bufferAvailableForReuse
- decompression buffer available for reuseprotected void prepareForSeek()
BlockCompressedInputStream
prepareForSeek
in class BlockCompressedInputStream
public void close() throws java.io.IOException
BlockCompressedInputStream
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class BlockCompressedInputStream
java.io.IOException