org.freehep.util.io
Class DecompressableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.freehep.util.io.DecompressableInputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
- Direct Known Subclasses:
- BitInputStream
public class DecompressableInputStream extends java.io.InputStreamSpecial stream that can be used to read uncompressed first and compressed from a certain byte. IMPORTANT: inherits from InputStream rather than FilterInputStream so that the correct read(byte[], int, int) method is used.
-
-
Constructor Summary
Constructors Constructor and Description DecompressableInputStream(java.io.InputStream input)Creates a Decompressable input stream from given stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intread()longskip(long n)voidstartDecompressing()Start reading in compressed mode from the next byte.
-
-
-
Constructor Detail
-
DecompressableInputStream
public DecompressableInputStream(java.io.InputStream input)
Creates a Decompressable input stream from given stream.- Parameters:
input- stream to read from.
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
startDecompressing
public void startDecompressing() throws java.io.IOExceptionStart reading in compressed mode from the next byte.- Throws:
java.io.IOException- if read fails.
-
-
DMelt 3.0 © DataMelt by jWork.ORG