Class RLEEncoder
java.lang.Object
com.twelvemonkeys.imageio.plugins.tga.RLEEncoder
- All Implemented Interfaces:
Encoder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidencode(OutputStream stream, byte[] buffer, int pOffset, int length) voidencode(OutputStream stream, ByteBuffer buffer) Encodes up tobuffer.remaining()bytes into the given input stream, from the given buffer.private booleanequalPixel(byte[] buffer, int offset, int compareOffset)
-
Field Details
-
pixelSize
private final int pixelSize
-
-
Constructor Details
-
RLEEncoder
RLEEncoder(int pixelDepth)
-
-
Method Details
-
encode
Description copied from interface:EncoderEncodes up tobuffer.remaining()bytes into the given input stream, from the given buffer.- Specified by:
encodein interfaceEncoder- Parameters:
stream- the output stream to encode data tobuffer- buffer to read data from- Throws:
IOException- if an I/O error occurs
-
encode
- Throws:
IOException
-
equalPixel
private boolean equalPixel(byte[] buffer, int offset, int compareOffset)
-