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()
Gets the amount of raw or compressed bytes read by the stream.
|
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, getUncompressedCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic 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 == nullpublic 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 static boolean matches(byte[] signature,
int length)
signature - the bytes to checklength - the number of bytes to checkpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic long getCompressedCount()
InputStreamStatisticsgetCompressedCount in interface InputStreamStatisticspublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] dest,
int offs,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved