public class BZip2CompressorInputStream extends CompressorInputStream implements InputStreamStatistics
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(java.io.InputStream in)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
BZip2CompressorInputStream(java.io.InputStream in,
boolean decompressConcatenated)
Constructs a new BZip2CompressorInputStream which decompresses bytes
read from the specified stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getCompressedCount() |
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) |
getBytesRead, getCount, getUncompressedCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUncompressedCount
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(java.io.InputStream in) throws java.io.IOException
in
- the InputStream from which this object should be createdjava.io.IOException
- if the stream content is malformed or an I/O error occurs.java.lang.NullPointerException
- if in == null
public BZip2CompressorInputStream(java.io.InputStream in, boolean decompressConcatenated) throws java.io.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 streamjava.io.IOException
- if in == null
, the stream content is malformed, or an I/O error occurs.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] dest, int offs, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long getCompressedCount()
getCompressedCount
in interface InputStreamStatistics
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to check"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"