org.apache.hadoop.io.compress
Class CompressionInputStream
java.lang.Object
java.io.InputStream
org.apache.hadoop.io.compress.CompressionInputStream
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- DefaultCodec.DefaultCompressionInputStream
public abstract class CompressionInputStream
- extends InputStream
A compression input stream.
- Author:
- Arun C Murthy
Field Summary |
protected InputStream |
in
The input stream to be compressed. |
Method Summary |
void |
close()
|
abstract int |
read(byte[] b,
int off,
int len)
Read bytes from the stream. |
abstract void |
resetState()
Reset the compression to the initial state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected final InputStream in
- The input stream to be compressed.
CompressionInputStream
protected CompressionInputStream(InputStream in)
- Create a compression input stream that reads
the decompressed bytes from the given stream.
- Parameters:
out
-
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
read
public abstract int read(byte[] b,
int off,
int len)
throws IOException
- Read bytes from the stream.
Made abstract to prevent leakage to underlying stream.
- Overrides:
read
in class InputStream
- Throws:
IOException
resetState
public abstract void resetState()
throws IOException
- Reset the compression to the initial state. Does not reset the underlying
stream.
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation