public class CBZip2InputStream extends InputStream implements BZip2Constants
The decompression requires large amounts of memory. Thus you should call
the close() method as soon as possible, to force
CBZip2InputStream to release the allocated memory. See
CBZip2OutputStream for information about memory
usage.
CBZip2InputStream reads bytes from the compressed source stream
via the single byte read() method
exclusively. Thus you should consider to use a buffered source stream.
Instances of this class are not threadsafe.
baseBlockSize, G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, N_GROUPS, N_ITERS, NUM_OVERSHOOT_BYTES, rNums, RUNA, RUNB| Constructor and Description |
|---|
CBZip2InputStream(InputStream in)
Constructs a new CBZip2InputStream which decompresses bytes read from the
specified stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] dest,
int offs,
int len) |
available, mark, markSupported, read, reset, skippublic CBZip2InputStream(InputStream in) throws IOException
Although BZip2 headers are marked with the magic "Bz" this constructor expects the next byte in the stream to be the first one after the magic. Thus callers have to skip the first two bytes. Otherwise this constructor will throw an exception.
IOException - 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 void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2014 Molindo GmbH. All Rights Reserved.