public class BZip2CompressorInputStream extends org.apache.commons.compress.compressors.CompressorInputStream implements BZip2Constants
| Modifier and Type | Class and Description |
|---|---|
static class |
BZip2CompressorInputStream.ReadMode |
BASEBLOCKSIZE, G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, N_GROUPS, N_ITERS, NUM_OVERSHOOT_BYTES, RUNA, RUNB| Constructor and Description |
|---|
BZip2CompressorInputStream(InputStream in)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
BZip2CompressorInputStream(InputStream in,
BZip2CompressorInputStream.ReadMode readMode)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPosition()
Get the current byte position with the raw input data stream.
|
boolean |
initBlock()
Initialize the next compression block.
|
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a bzip2 file.
|
int |
read() |
int |
read(byte[] dest,
int offs,
int len) |
boolean |
skipToBlock(long startOffset,
long endOffset)
Skip from the current raw input stream position to the start of the split boundary defined
by the given start offset and end offset.
|
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytesavailable, mark, markSupported, read, reset, skippublic BZip2CompressorInputStream(InputStream in) throws IOException
IOException - if the stream content is malformed or an I/O error occurs.NullPointerException - if in == nullpublic BZip2CompressorInputStream(InputStream in, BZip2CompressorInputStream.ReadMode readMode) throws IOException
in - the InputStream from which this object should be createddecompressConcatenated - if true, decompress until the end of the input;
if false, stop after the first .bz2 stream and
leave the input position to point to the next
byte after the .bz2 streamIOException - if the stream content is malformed or an I/O error occurs.NullPointerException - if in == nullpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] dest,
int offs,
int len)
throws IOException
read in class InputStreamIOExceptionpublic boolean initBlock()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic static boolean matches(byte[] signature,
int length)
signature - the bytes to checklength - the number of bytes to checkpublic boolean skipToBlock(long startOffset,
long endOffset)
throws IOException
startOffset - start byte offset of the data splitendOffset - end byte offset of the data splitIOException - thrown if any I/O errors occurpublic long getPosition()
Copyright © 2020 Actian Corporation. All rights reserved.