@InterfaceAudience.Public @InterfaceStability.Evolving public class DecompressorStream extends CompressionInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer |
protected boolean |
closed |
protected Decompressor |
decompressor |
protected boolean |
eof |
in, maxAvailableData| Modifier | Constructor and Description |
|---|---|
protected |
DecompressorStream(InputStream in)
Allow derived classes to directly set the underlying stream.
|
|
DecompressorStream(InputStream in,
Decompressor decompressor) |
|
DecompressorStream(InputStream in,
Decompressor decompressor,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
protected void |
checkStream() |
void |
close() |
protected int |
decompress(byte[] b,
int off,
int len) |
protected int |
getCompressedData() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len)
Read bytes from the stream.
|
void |
reset() |
void |
resetState()
Reset the decompressor to its initial state and discard any buffered data,
as the underlying stream may have been repositioned.
|
long |
skip(long n) |
getPos, seek, seekToNewSourcereadprotected Decompressor decompressor
protected byte[] buffer
protected boolean eof
protected boolean closed
public DecompressorStream(InputStream in, Decompressor decompressor, int bufferSize) throws IOException
IOExceptionpublic DecompressorStream(InputStream in, Decompressor decompressor) throws IOException
IOExceptionprotected DecompressorStream(InputStream in) throws IOException
in - Underlying input stream.IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
CompressionInputStreamread in class CompressionInputStreamIOExceptionprotected int decompress(byte[] b,
int off,
int len)
throws IOException
IOExceptionprotected int getCompressedData()
throws IOException
IOExceptionprotected void checkStream()
throws IOException
IOExceptionpublic void resetState()
throws IOException
CompressionInputStreamresetState in class CompressionInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class CompressionInputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionCopyright © 2019 Apache Software Foundation. All rights reserved.