Class PNGConverter.Chunk

java.lang.Object
org.apache.pdfbox.pdmodel.graphics.image.PNGConverter.Chunk
Enclosing class:
PNGConverter

static final class PNGConverter.Chunk extends Object
Holds the information about a chunks
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) byte[]
    Get the data of this chunk as a byte array

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • bytes

      byte[] bytes
      This 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 chunkType
      The chunk type, see the CHUNK_??? constants.
    • crc

      int crc
      The crc of the chunk data, as stored in the PNG stream.
    • start

      int start
      The start index of the chunk data within bytes.
    • length

      int length
      The 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