|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.at4j.comp.lzma.LzmaInputStreamSettings
public class LzmaInputStreamSettings
This object contains configuration that decides how a LzmaInputStream
behaves. When new:ed, this object contains the default settings.
LzmaInputStream
Field Summary | |
---|---|
static int |
DEFAULT_MAX_DATA_QUEUE_DEPTH
The default maximum depth of the incoming data queue. |
static boolean |
DEFAULT_READ_UNCOMPRESSED_SIZE
By default, the stream tries to read the uncompressed size of the data after reading the decoder properties. |
Constructor Summary | |
---|---|
LzmaInputStreamSettings()
|
Method Summary | |
---|---|
int |
getMaxDataQueueDepth()
Get the maximum depth of the incoming data queue. |
byte[] |
getProperties()
Get the decoder properties or null if they are not known
beforehand. |
ThreadFactory |
getThreadFactory()
Get the thread factory that will be used for creating the LZMA decompression thread. |
long |
getUncompressedSize()
Get the size of uncompressed data in the stream. |
boolean |
isReadUncompressedSize()
Should the uncompressed size of data in the stream be read after the stream properties header? |
LzmaInputStreamSettings |
setMaxDataQueueDepth(int depth)
Set the maximum depth of the incoming data queue. |
LzmaInputStreamSettings |
setProperties(byte[] barr)
Set the stream decoder properties (five bytes). |
LzmaInputStreamSettings |
setReadUncompressedSize(boolean b)
Should the size of the data in the stream when uncompressed be read after the encoding settings header has been read? If the uncompressed size can be determined in some other way, this may be omitted from the stream. |
LzmaInputStreamSettings |
setThreadFactory(ThreadFactory tf)
Set the thread factory to use for creating the thread that will run the LZMA decompression. |
LzmaInputStreamSettings |
setUncompressedSize(long size)
Set the uncompressed size of the data that can be read from the stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_READ_UNCOMPRESSED_SIZE
setReadUncompressedSize(boolean)
.
public static final int DEFAULT_MAX_DATA_QUEUE_DEPTH
setMaxDataQueueDepth(int)
.
Constructor Detail |
---|
public LzmaInputStreamSettings()
Method Detail |
---|
public LzmaInputStreamSettings setReadUncompressedSize(boolean b)
The default behavior is to read the data size.
Even if the uncompressed data size is set with
setUncompressedSize(long)
, the input stream will try to read the
size anyway if this is set to true
. In this case, the read size
is discarded and the size from setUncompressedSize(long)
is
used.
b
- Should the data size be read?
this
setUncompressedSize(long)
public boolean isReadUncompressedSize()
true
if the uncompressed size of data in the stream is
read after the stream properties header.setReadUncompressedSize(boolean)
public LzmaInputStreamSettings setUncompressedSize(long size) throws IllegalArgumentException
-1
(unknown).
size
- The size of uncompressed data in the stream.
this
.
IllegalArgumentException
- If the size is less than -1
.setReadUncompressedSize(boolean)
public long getUncompressedSize()
-1
if
that is not known beforehand.setUncompressedSize(long)
public LzmaInputStreamSettings setProperties(byte[] barr) throws IllegalArgumentException
barr
- The decoder properties.
this
IllegalArgumentException
- If the property array is not five bytes
long.public byte[] getProperties()
null
if they are not known
beforehand.
setProperties(byte[])
public LzmaInputStreamSettings setMaxDataQueueDepth(int depth) throws IllegalArgumentException
The default value of this is 1. Setting it to 2 may give a slightly faster decompression at the expense of a higher memory usage.
depth
- The maximum depth of the incoming data queue.
this
IllegalArgumentException
- If the depth is less than 1.public int getMaxDataQueueDepth()
setMaxDataQueueDepth(int)
public LzmaInputStreamSettings setThreadFactory(ThreadFactory tf)
If this is not set, the LzmaInputStream
will just create a thread
with new Thread
.
By default, this property is null
.
tf
- The thread factory, or null
if the
LzmaInputStream
should use new Thread
to create the
decompression thread.
this
public ThreadFactory getThreadFactory()
null
if not set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |