class GenericCRCEncoder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
bytePos |
private java.util.zip.CRC32 |
crc |
private int |
dataLen |
private byte[] |
int2 |
private byte[] |
int4 |
private byte[] |
pngBytes |
protected int |
startPos |
| Constructor and Description |
|---|
GenericCRCEncoder() |
| 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(java.lang.String s)
Write a string into the pngBytes array at a given position.
|
protected int startPos
protected int bytePos
private java.util.zip.CRC32 crc
private byte[] pngBytes
private 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(java.lang.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.