Class PNGConverter.Chunk
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.image.PNGConverter.Chunk
- Enclosing class:
- PNGConverter
Holds the information about a chunks
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]
This field holds the whole byte array; In that it's redundant, as all chunks will have the same byte array.(package private) int
The chunk type, see the CHUNK_??? constants.(package private) int
The crc of the chunk data, as stored in the PNG stream.(package private) int
The length of the data within the byte array.(package private) int
The start index of the chunk data within bytes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) byte[]
getData()
Get the data of this chunk as a byte array
-
Field Details
-
bytes
byte[] bytesThis field holds the whole byte array; In that it's redundant, as all chunks will have the same byte array. But have this byte array per chunk makes it easier to validate and pass around. And we won't have that many chunks, so those 8 bytes for the pointer (on 64-bit systems) don't matter. -
chunkType
int chunkTypeThe chunk type, see the CHUNK_??? constants. -
crc
int crcThe crc of the chunk data, as stored in the PNG stream. -
start
int startThe start index of the chunk data within bytes. -
length
int lengthThe length of the data within the byte array.
-
-
Constructor Details
-
Chunk
Chunk()
-
-
Method Details
-
getData
byte[] getData()Get the data of this chunk as a byte array- Returns:
- a byte-array with only the data of the chunk
-