org.apache.commons.compress.compressors.bzip2
public class BZip2CompressorInputStream extends CompressorInputStream
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() |
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) |
count, count, getBytesRead, getCount, pushedBackBytes
available, mark, markSupported, read, reset, skip
public 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 == nullpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] dest, int offs, int len) throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
public static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to checkCopyright © 2014 The Apache Software Foundation. All rights reserved.