abstract class CRCEncoder extends ImageEncoder
Modifier and Type | Field and Description |
---|---|
protected int |
bytePos |
private CRC32 |
crc |
protected int |
dataLen |
private byte[] |
int2 |
private byte[] |
int4 |
protected byte[] |
pngBytes |
protected int |
startPos |
Constructor and Description |
---|
CRCEncoder() |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
getBytes() |
protected static void |
getInt4(int n,
byte[] int4) |
protected void |
setData(byte[] b,
int pt) |
protected void |
writeByte(int b)
Write a single byte into the pngBytes array at a given position.
|
protected void |
writeBytes(byte[] data)
Write an array of bytes into the pngBytes array.
|
protected void |
writeCRC() |
protected void |
writeInt2(int n)
Write a two-byte integer into the pngBytes array at a given position.
|
protected void |
writeInt4(int n)
Write a four-byte integer into the pngBytes array at a given position.
|
protected void |
writeString(String s)
Write a string into the pngBytes array at a given position.
|
close, createImage, encodeImage, generate, putByte, putString, setParams
protected int startPos
protected int bytePos
private CRC32 crc
protected byte[] pngBytes
protected int dataLen
private byte[] int2
private byte[] int4
protected void setData(byte[] b, int pt)
protected byte[] getBytes()
protected void writeCRC()
protected void writeInt2(int n)
n
- The integer to be written into pngBytes.protected void writeInt4(int n)
n
- The integer to be written into pngBytes.protected static void getInt4(int n, byte[] int4)
protected void writeByte(int b)
b
- The byte to be written into pngBytes.protected void writeString(String s)
s
- The string to be written into pngBytes.String.getBytes()
protected void writeBytes(byte[] data)
data
- The data to be written into pngBytes.