public final class BGZIPOutputStream
extends java.io.OutputStream
Class BGZIPOutputStream
is an output stream filter that performs
BGZIP compression.
The GZIP file format specification is described RFC 1952 and the BGZIP file format specification is described in the Sequence Alignment/Map Format Specification
Instances of class BGZIPOutputStream
are not thread safe.
Constructor and Description |
---|
BGZIPOutputStream(java.io.OutputStream os,
boolean writeEmptyBlock)
Creates a new
BGZIPOutputStream instance that writes
to the specified output stream. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
static void |
main(java.lang.String[] args)
Applies BGZIP compression on the specified files.
|
void |
write(byte[] ba) |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int b) |
public BGZIPOutputStream(java.io.OutputStream os, boolean writeEmptyBlock)
BGZIPOutputStream
instance that writes
to the specified output stream.os
- the output streamwriteEmptyBlock
- true
if the close()
method will
write an empty BGZIP block to the end of the streamjava.lang.NullPointerException
- if os == null
public static void main(java.lang.String[] args) throws java.io.IOException
args
- a list of files that will be compressedjava.io.IOException
- if an I/O error occurspublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] ba) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException