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, reset
public UncompressInputStream(InputStream is) throws IOException
is
- the input stream to decompressIOException
- if the header is malformedpublic int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long num) throws IOException
skip
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
public boolean markSupported()
markSupported
in class FilterInputStream
public 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 failureException
Copyright © 2000–2018 BioJava. All rights reserved.