public abstract class CompressionInputStream extends InputStream implements Seekable
Implementations are assumed to be buffered. This permits clients to
reposition the underlying input stream then call resetState(),
without having to also synchronize client buffers.
| 限定符和类型 | 字段和说明 |
|---|---|
protected InputStream |
in
The input stream to be compressed.
|
protected long |
maxAvailableData |
| 限定符 | 构造器和说明 |
|---|---|
protected |
CompressionInputStream(InputStream in)
Create a compression input stream that reads
the decompressed bytes from the given stream.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
long |
getPos()
This method returns the current position in the stream.
|
abstract int |
read(byte[] b,
int off,
int len)
Read bytes from the stream.
|
abstract void |
resetState()
Reset the decompressor to its initial state and discard any buffered data,
as the underlying stream may have been repositioned.
|
void |
seek(long pos)
This method is current not supported.
|
boolean |
seekToNewSource(long targetPos)
This method is current not supported.
|
available, mark, markSupported, read, read, reset, skipprotected final InputStream in
protected long maxAvailableData
protected CompressionInputStream(InputStream in) throws IOException
in - The input stream to be compressed.IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionpublic abstract int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionpublic abstract void resetState()
throws IOException
IOExceptionpublic long getPos()
throws IOException
getPos 在接口中 SeekableIOExceptionpublic void seek(long pos)
throws UnsupportedOperationException
seek 在接口中 SeekableUnsupportedOperationExceptionpublic boolean seekToNewSource(long targetPos)
throws UnsupportedOperationException
seekToNewSource 在接口中 SeekableUnsupportedOperationExceptionCopyright © 2009 The Apache Software Foundation