@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, seekToNewSource
read
protected Decompressor decompressor
protected byte[] buffer
protected boolean eof
protected boolean closed
public DecompressorStream(InputStream in, Decompressor decompressor, int bufferSize) throws IOException
IOException
public DecompressorStream(InputStream in, Decompressor decompressor) throws IOException
IOException
protected DecompressorStream(InputStream in) throws IOException
in
- Underlying input stream.IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
CompressionInputStream
read
in class CompressionInputStream
IOException
protected int decompress(byte[] b, int off, int len) throws IOException
IOException
protected int getCompressedData() throws IOException
IOException
protected void checkStream() throws IOException
IOException
public void resetState() throws IOException
CompressionInputStream
resetState
in class CompressionInputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class CompressionInputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.