mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 12:05:29 -04:00
Added extra constructor to DecoderStream to allow for correct IFF reading.
Doc clean-up.
This commit is contained in:
parent
8572633686
commit
ecc79e0478
@ -52,6 +52,7 @@ public final class DecoderStream extends FilterInputStream {
|
|||||||
/**
|
/**
|
||||||
* Creates a new decoder stream and chains it to the
|
* Creates a new decoder stream and chains it to the
|
||||||
* input stream specified by the {@code pStream} argument.
|
* input stream specified by the {@code pStream} argument.
|
||||||
|
* The stream will use a default decode buffer size.
|
||||||
*
|
*
|
||||||
* @param pStream the underlying input stream.
|
* @param pStream the underlying input stream.
|
||||||
* @param pDecoder the decoder that will be used to decode the underlying stream
|
* @param pDecoder the decoder that will be used to decode the underlying stream
|
||||||
@ -59,9 +60,23 @@ public final class DecoderStream extends FilterInputStream {
|
|||||||
* @see java.io.FilterInputStream#in
|
* @see java.io.FilterInputStream#in
|
||||||
*/
|
*/
|
||||||
public DecoderStream(final InputStream pStream, final Decoder pDecoder) {
|
public DecoderStream(final InputStream pStream, final Decoder pDecoder) {
|
||||||
|
this(pStream, pDecoder, 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new decoder stream and chains it to the
|
||||||
|
* input stream specified by the {@code pStream} argument.
|
||||||
|
*
|
||||||
|
* @param pStream the underlying input stream.
|
||||||
|
* @param pDecoder the decoder that will be used to decode the underlying stream
|
||||||
|
* @param pBufferSize the size of the decode buffer
|
||||||
|
*
|
||||||
|
* @see java.io.FilterInputStream#in
|
||||||
|
*/
|
||||||
|
public DecoderStream(final InputStream pStream, final Decoder pDecoder, final int pBufferSize) {
|
||||||
super(pStream);
|
super(pStream);
|
||||||
mDecoder = pDecoder;
|
mDecoder = pDecoder;
|
||||||
mBuffer = new byte[1024];
|
mBuffer = new byte[pBufferSize];
|
||||||
mBufferPos = 0;
|
mBufferPos = 0;
|
||||||
mBufferLimit = 0;
|
mBufferLimit = 0;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public final class PackBitsDecoder implements Decoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a {@code PackBitsDecoder}.
|
* Creates a {@code PackBitsDecoder}, with optional compatibility mode.
|
||||||
* <p/>
|
* <p/>
|
||||||
* As some implementations of PackBits-like encoders treat {@code -128} as length of
|
* As some implementations of PackBits-like encoders treat {@code -128} as length of
|
||||||
* a compressed run, instead of a no-op, it's possible to disable no-ops
|
* a compressed run, instead of a no-op, it's possible to disable no-ops
|
||||||
|
Loading…
x
Reference in New Issue
Block a user