|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.hadoop.io.compress.CompressionInputStream
public abstract class CompressionInputStream
A compression input stream.
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.
| Field Summary | |
|---|---|
protected InputStream |
in
The input stream to be compressed. |
protected long |
maxAvailableData
|
| Constructor Summary | |
|---|---|
protected |
CompressionInputStream(InputStream in)
Create a compression input stream that reads the decompressed bytes from the given stream. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final InputStream in
protected long maxAvailableData
| Constructor Detail |
|---|
protected CompressionInputStream(InputStream in)
throws IOException
in - The input stream to be compressed.
IOException| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
public abstract int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException
public abstract void resetState()
throws IOException
IOException
public long getPos()
throws IOException
getPos in interface SeekableIOException
public void seek(long pos)
throws UnsupportedOperationException
seek in interface SeekableUnsupportedOperationException
public boolean seekToNewSource(long targetPos)
throws UnsupportedOperationException
seekToNewSource in interface SeekableUnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||