|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.at4j.comp.bzip2.BZip2OutputStream
public class BZip2OutputStream
This is an OutputStream for bzip2 compressing data.
For more information on the inner workings of bzip2, see the Wikipedia article on bzip2.
This stream is not safe for concurrent access by several writing threads. A client must provide external synchronization to use this from several threads.
BZip2OutputStreamSettings,
BZip2InputStream| Constructor Summary | |
|---|---|
BZip2OutputStream(OutputStream wrapped)
Create a new bzip2 compressing output stream with default settings. |
|
BZip2OutputStream(OutputStream wrapped,
BZip2OutputStreamSettings settings)
Create a new bzip2 compressing output stream. |
|
| Method Summary | |
|---|---|
void |
close()
|
static BZip2EncoderExecutorService |
createExecutorService()
Create a BZip2EncoderExecutorService that can be shared between
several BZip2OutputStream:s to spread the bzip2 encoding work
over several threads. |
static BZip2EncoderExecutorService |
createExecutorService(int noThreads)
Create a BZip2EncoderExecutorService that can be shared between
several BZip2OutputStream:s to spread the bzip2 encoding work
over several threads. |
boolean |
equals(Object o)
|
protected void |
finalize()
Close the stream if the client has been sloppy about it. |
int |
hashCode()
|
void |
write(byte[] data)
|
void |
write(byte[] data,
int offset,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.io.OutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BZip2OutputStream(OutputStream wrapped)
throws IOException
wrapped - Compressed data is written to this stream.
IOException - On errors writing the file header.BZip2OutputStream(OutputStream, BZip2OutputStreamSettings)
public BZip2OutputStream(OutputStream wrapped,
BZip2OutputStreamSettings settings)
throws IOException
wrapped - Compressed data is written to this stream.settings - Compression settings.
IOException - On errors writing the file header.BZip2OutputStream(OutputStream)| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] data)
throws IOException
write in class OutputStreamIOException
public void write(byte[] data,
int offset,
int len)
throws IOException,
IndexOutOfBoundsException
write in class OutputStreamIOException
IndexOutOfBoundsException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic static BZip2EncoderExecutorService createExecutorService(int noThreads)
BZip2EncoderExecutorService that can be shared between
several BZip2OutputStream:s to spread the bzip2 encoding work
over several threads. The created executor service can be passed to the
BZip2OutputStream constructor in a
BZip2OutputStreamSettings object.
noThreads - The number of threads available to the executor.
public static BZip2EncoderExecutorService createExecutorService()
BZip2EncoderExecutorService that can be shared between
several BZip2OutputStream:s to spread the bzip2 encoding work
over several threads. The created executor service can be passed to the
BZip2OutputStream constructor in a
BZip2OutputStreamSettings object.
The created executor will have as many threads available to it as there are CPU:s available to the JVM.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||