|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectar.com.hjg.pngj.chunks.ChunkRaw
public class ChunkRaw
Raw (physical) chunk.
Short lived object, to be created while serialing/deserializing Do not reuse it for different chunks.
See http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html
Field Summary | |
---|---|
byte[] |
data
The data bytes appropriate to the chunk type, if any. |
byte[] |
idbytes
A 4-byte chunk type code. uppercase and lowercase ASCII letters |
int |
len
The length counts only the data field, not itself, the chunk type code, or the CRC. |
Constructor Summary | |
---|---|
ChunkRaw(int len,
byte[] idbytes,
boolean alloc)
|
Method Summary | |
---|---|
int |
readChunkData(java.io.InputStream is)
position before: just after chunk id. positon after: after crc Data should be already allocated. |
java.lang.String |
toString()
|
void |
writeChunk(java.io.OutputStream os)
Computes the CRC and writes to the stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte[] data
public final byte[] idbytes
public final int len
Constructor Detail |
---|
public ChunkRaw(int len, byte[] idbytes, boolean alloc)
len
- : data lenidbytes
- : chunk type (deep copied)alloc
- : it true, the data array will be alloccedMethod Detail |
---|
public int readChunkData(java.io.InputStream is)
public java.lang.String toString()
toString
in class java.lang.Object
public void writeChunk(java.io.OutputStream os)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |