org.gcube.indexmanagement.common
Class DecompressingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.gcube.indexmanagement.common.DecompressingInputStream
- All Implemented Interfaces:
- Closeable
public class DecompressingInputStream
- extends FilterInputStream
An InputStream used to read LZW compressed data written by a
CompressingOutputStream. See http://en.wikipedia.org/wiki/LZW for an
explanation of the algorithm.
- Version:
- 0.1
- See Also:
CompressingOutputStream
|
Constructor Summary |
DecompressingInputStream(InputStream in)
Constructor which wraps an input stream, and initializes the code map
with all possible values of a single byte, before increasing the codesize
to the size of one byte + 1 to make place for the next code |
|
Method Summary |
void |
mark(int i)
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecompressingInputStream
public DecompressingInputStream(InputStream in)
- Constructor which wraps an input stream, and initializes the code map
with all possible values of a single byte, before increasing the codesize
to the size of one byte + 1 to make place for the next code
- Parameters:
in - -
the input stream to read the compressed data from
read
public int read()
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
mark
public void mark(int i)
-
- Overrides:
mark in class FilterInputStream
reset
public void reset()
throws IOException
-
- Overrides:
reset in class FilterInputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
-
- Overrides:
skip in class FilterInputStream
- Throws:
IOException
Copyright © 2013. All Rights Reserved.