org.at4j.comp.bzip2
Class BZip2ReadableFileSettings

java.lang.Object
  extended by org.at4j.comp.bzip2.BZip2ReadableFileSettings
All Implemented Interfaces:
Cloneable

public class BZip2ReadableFileSettings
extends Object
implements Cloneable

Settings used when creating a BZip2ReadableFile object.

When this object is created it contains the default settings. Change the settings by calling setter methods.

Since:
1.1
Author:
Karl Gustafsson

Constructor Summary
BZip2ReadableFileSettings()
           
 
Method Summary
 BZip2ReadableFileSettings clone()
          Make a copy of this object.
 int getBufferSize()
           
 BZip2InputStreamSettings getInputStreamSettings()
          Get the settings for a BZip2InputStream based on the configuration of this object.
 LogAdapter getLogAdapter()
           
 boolean isUseCommonsCompress()
           
 BZip2ReadableFileSettings setBufferSize(int bufferSize)
          Set the buffer size for the buffered input stream that the bzip2 input stream is opened on.
 BZip2ReadableFileSettings setLogAdapter(LogAdapter la)
          Set a log adapter that the bzip2 input stream will use to log diagnostic output.
 BZip2ReadableFileSettings setUseCommonsCompress(boolean b)
          Should the bzip2 input stream from Apache Commons Compress be used instead of At4J's implementation?
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BZip2ReadableFileSettings

public BZip2ReadableFileSettings()
Method Detail

setBufferSize

public BZip2ReadableFileSettings setBufferSize(int bufferSize)
                                        throws IllegalArgumentException
Set the buffer size for the buffered input stream that the bzip2 input stream is opened on.

Parameters:
bufferSize - The size of the buffer for the buffered input stream that the bzip2 input stream is opened on. Set this to -1 to use the default buffer size (8192 bytes).
Returns:
this
Throws:
IllegalArgumentException

getBufferSize

public int getBufferSize()

setUseCommonsCompress

public BZip2ReadableFileSettings setUseCommonsCompress(boolean b)
Should the bzip2 input stream from Apache Commons Compress be used instead of At4J's implementation?

Parameters:
b - Should Apache Commons Compress' bzip2 implementation be used instead of At4J's
Returns:
this

isUseCommonsCompress

public boolean isUseCommonsCompress()

setLogAdapter

public BZip2ReadableFileSettings setLogAdapter(LogAdapter la)
Set a log adapter that the bzip2 input stream will use to log diagnostic output.

Parameters:
la - The log adapter.
Returns:
this

getLogAdapter

public LogAdapter getLogAdapter()

getInputStreamSettings

public BZip2InputStreamSettings getInputStreamSettings()
Get the settings for a BZip2InputStream based on the configuration of this object.

Returns:
Stream settings.

clone

public BZip2ReadableFileSettings clone()
Make a copy of this object.

Overrides:
clone in class Object