Added extra constructor to DecoderStream to allow for correct IFF reading.

Doc clean-up.
This commit is contained in:
Harald Kuhr 2009-11-04 01:21:10 +01:00
parent 8572633686
commit ecc79e0478
2 changed files with 18 additions and 3 deletions

View File

@ -52,6 +52,7 @@ public final class DecoderStream extends FilterInputStream {
/**
* Creates a new decoder stream and chains it to the
* input stream specified by the {@code pStream} argument.
* The stream will use a default decode buffer size.
*
* @param pStream the underlying input 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
*/
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);
mDecoder = pDecoder;
mBuffer = new byte[1024];
mBuffer = new byte[pBufferSize];
mBufferPos = 0;
mBufferLimit = 0;
}

View File

@ -75,7 +75,7 @@ public final class PackBitsDecoder implements Decoder {
}
/**
* Creates a {@code PackBitsDecoder}.
* Creates a {@code PackBitsDecoder}, with optional compatibility mode.
* <p/>
* 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