Interface Decoder
- All Known Implementing Classes:
AbstractRLEDecoder, Base64Decoder, LZWDecoder, LZWDecoder.LZWCompatibilityDecoder, LZWDecoder.LZWSpecDecoder, PackBitsDecoder, RGB8RLEDecoder, RLE4Decoder, RLE8Decoder, RLEDecoder, RLEDecoder, RLEDecoder
public interface Decoder
Interface for decoders.
A
Decoder may be used with a DecoderStream, to perform
on-the-fly decoding from an InputStream.
Important note: Decoder implementations are typically not synchronized.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/enc/Decoder.java#2 $
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintdecode(InputStream stream, ByteBuffer buffer) Decodes up tobuffer.lengthbytes from the given input stream, into the given buffer.
-
Method Details
-
decode
Decodes up tobuffer.lengthbytes from the given input stream, into the given buffer.- Parameters:
stream- the input stream to decode data frombuffer- buffer to store the read data- Returns:
- the total number of bytes read into the buffer, or
0if there is no more data because the end of the stream has been reached. - Throws:
DecodeException- if encoded data is corrupt.IOException- if an I/O error occurs.EOFException- if a premature end-of-file is encountered.NullPointerException- if either argument isnull.
-