Package org.biojava3.core.util
Class UncompressInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.biojava3.core.util.UncompressInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
This class decompresses an input stream containing data compressed with the unix "compress"
utility (LZC, a LZW variant). This code is based heavily on the unlzw.c code in
gzip-1.2.4 (written by Peter Jannesen) and the original compress code.
This version has been modified from the original 0.3-3 version by the Unidata Program Center
(support@xxxxxxxxxxxxxxxx) to make the constructor public and to fix a couple of bugs. Also: -
markSupported() returns false - add uncompress() static method
- Version:
- 0.3-3 06/05/2001
- Author:
- Ronald Tschalar, Unidata Program Center, Richard Holland - making LZW_MAGIC package-visible.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static void
boolean
This stream does not support mark/reset on the stream.int
read()
int
read
(byte[] buf, int off, int len) long
skip
(long num) static void
uncompress
(String fileInName, FileOutputStream out) Methods inherited from class java.io.FilterInputStream
close, mark, read, reset
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
UncompressInputStream
- Parameters:
is
- the input stream to decompress- Throws:
IOException
- if the header is malformed
-
-
Method Details
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()This stream does not support mark/reset on the stream.- Overrides:
markSupported
in classFilterInputStream
- Returns:
- false
-
uncompress
- Throws:
IOException
-
main
- Throws:
Exception
-