Class RLEDecoder
java.lang.Object
com.twelvemonkeys.imageio.plugins.tga.RLEDecoder
- All Implemented Interfaces:
Decoder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdecode(InputStream stream, ByteBuffer buffer) Decodes up tobuffer.lengthbytes from the given input stream, into the given buffer.
-
Field Details
-
pixel
private final byte[] pixel
-
-
Constructor Details
-
RLEDecoder
RLEDecoder(int pixelDepth)
-
-
Method Details
-
decode
Description copied from interface:DecoderDecodes up tobuffer.lengthbytes from the given input stream, into the given buffer.- Specified by:
decodein interfaceDecoder- 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:
IOException- if an I/O error occurs.
-