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 void
encode
(OutputStream stream, byte[] buffer, int pOffset, int length) void
encode
(OutputStream stream, ByteBuffer buffer) Encodes up tobuffer.remaining()
bytes into the given input stream, from the given buffer.private boolean
equalPixel
(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:Encoder
Encodes up tobuffer.remaining()
bytes into the given input stream, from the given buffer.- Specified by:
encode
in 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)
-