public class UncompressInputStream extends FilterInputStream
in| Constructor and Description |
|---|
UncompressInputStream(InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
static void |
main(String[] args)
Reads a file, uncompresses it, and sends the result to stdout.
|
boolean |
markSupported()
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 long |
uncompress(InputStream in,
OutputStream out)
Read an input stream and uncompress it to an output stream.
|
static long |
uncompress(String fileInName,
FileOutputStream out)
Read a named file and uncompress it.
|
close, mark, read, resetpublic UncompressInputStream(InputStream is) throws IOException
is - the input stream to decompressIOException - if the header is malformedpublic int read() throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] buf, int off, int len) throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long num) throws IOException
skip in class FilterInputStreamIOExceptionpublic int available() throws IOException
available in class FilterInputStreamIOExceptionpublic boolean markSupported()
markSupported in class FilterInputStreampublic static long uncompress(String fileInName, FileOutputStream out) throws IOException
fileInName - Name of compressed file.out - A destination for the result. It is closed after data is sent.IOException - for any errorpublic static long uncompress(InputStream in, OutputStream out) throws IOException
in - the incoming InputStream. It is NOT closed.out - the destination OutputStream. It is NOT closed.IOException - for any errorpublic static void main(String[] args) throws Exception
args - An array with one String element, the name of the file to read.IOException - for any failureExceptionCopyright © 2000–2019 BioJava. All rights reserved.