java.io.Closeable, java.lang.AutoCloseable, Seekable, IOStatisticsSourceBlockDecompressorStream, PassthroughCodec.PassthroughDecompressorStream@Public @Evolving public class DecompressorStream extends CompressionInputStream
| Modifier and Type | Field | Description |
|---|---|---|
protected byte[] |
buffer |
|
protected boolean |
closed |
|
protected Decompressor |
decompressor |
|
protected boolean |
eof |
in, maxAvailableData| Modifier | Constructor | Description |
|---|---|---|
protected |
DecompressorStream(java.io.InputStream in) |
Allow derived classes to directly set the underlying stream.
|
|
DecompressorStream(java.io.InputStream in,
Decompressor decompressor) |
|
|
DecompressorStream(java.io.InputStream in,
Decompressor decompressor,
int bufferSize) |
| Modifier and Type | Method | 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) |
getIOStatistics, getPos, seek, seekToNewSourceprotected Decompressor decompressor
protected byte[] buffer
protected boolean eof
protected boolean closed
public DecompressorStream(java.io.InputStream in,
Decompressor decompressor,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionpublic DecompressorStream(java.io.InputStream in,
Decompressor decompressor)
throws java.io.IOException
java.io.IOExceptionprotected DecompressorStream(java.io.InputStream in)
throws java.io.IOException
in - Underlying input stream.java.io.IOException - raised on errors performing I/O.public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
CompressionInputStreamread in class CompressionInputStreamjava.io.IOExceptionprotected int decompress(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionprotected int getCompressedData()
throws java.io.IOException
java.io.IOExceptionprotected void checkStream()
throws java.io.IOException
java.io.IOExceptionpublic void resetState()
throws java.io.IOException
CompressionInputStreamresetState in class CompressionInputStreamjava.io.IOException - raised on errors performing I/O.public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class CompressionInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int readlimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.