LocationAware
, Closeable
, AutoCloseable
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 | Description |
---|---|
AsyncBlockCompressedInputStream(SeekableStream strm) |
|
AsyncBlockCompressedInputStream(SeekableStream strm,
InflaterFactory inflaterFactory) |
|
AsyncBlockCompressedInputStream(File file) |
|
AsyncBlockCompressedInputStream(File file,
InflaterFactory inflaterFactory) |
|
AsyncBlockCompressedInputStream(InputStream stream) |
|
AsyncBlockCompressedInputStream(InputStream stream,
InflaterFactory inflaterFactory) |
|
AsyncBlockCompressedInputStream(URL url) |
|
AsyncBlockCompressedInputStream(URL url,
InflaterFactory inflaterFactory) |
Modifier and Type | Method | 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
mark, markSupported, readAllBytes, readNBytes, reset, skip, transferTo
public AsyncBlockCompressedInputStream(InputStream stream)
public AsyncBlockCompressedInputStream(InputStream stream, InflaterFactory inflaterFactory)
public AsyncBlockCompressedInputStream(File file) throws IOException
IOException
public AsyncBlockCompressedInputStream(File file, InflaterFactory inflaterFactory) throws IOException
IOException
public AsyncBlockCompressedInputStream(URL url)
public AsyncBlockCompressedInputStream(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 IOException
BlockCompressedInputStream
close
in interface AutoCloseable
close
in interface Closeable
close
in class BlockCompressedInputStream
IOException