public class BZip2CompressorInputStream extends InputStream
Forked from Apache Commons-Compress with possible changes
| Modifier and Type | Field and Description |
|---|---|
static int |
BASEBLOCKSIZE |
static int |
G_SIZE |
static int |
MAX_ALPHA_SIZE |
static int |
MAX_CODE_LEN |
static int |
MAX_SELECTORS |
static int |
N_GROUPS |
static int |
N_ITERS |
static int |
NUM_OVERSHOOT_BYTES |
static int |
RUNA |
static int |
RUNB |
| Constructor and Description |
|---|
BZip2CompressorInputStream(InputStream in)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
BZip2CompressorInputStream(InputStream in,
boolean decompressConcatenated)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
count(int read)
Increments the counter of already read bytes.
|
protected void |
count(long read)
Increments the counter of already read bytes.
|
long |
getBytesRead()
Returns the current number of bytes read from this stream.
|
int |
getCount()
Deprecated.
this method may yield wrong results for large
archives, use #getBytesRead instead
|
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) |
available, mark, markSupported, read, reset, skippublic static final int BASEBLOCKSIZE
public static final int MAX_ALPHA_SIZE
public static final int MAX_CODE_LEN
public static final int RUNA
public static final int RUNB
public static final int N_GROUPS
public static final int G_SIZE
public static final int N_ITERS
public static final int MAX_SELECTORS
public static final int NUM_OVERSHOOT_BYTES
public 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, boolean decompressConcatenated) 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 == nullprotected void count(int read)
read - the number of bytes readprotected void count(long read)
read - the number of bytes read@Deprecated public int getCount()
public long getBytesRead()
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] dest,
int offs,
int len)
throws IOException
read in class InputStreamIOExceptionpublic 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 checkCopyright © 2016 JBoss by Red Hat. All rights reserved.