Class Chunk


  • public class Chunk
    extends Object
    A chunk of DDM data. This is really just meant to hold a few pieces of data together. The "offset" and "length" fields are present so handlers can over-allocate or share byte buffers.
    • Field Detail

      • type

        public int type
      • data

        public byte[] data
      • offset

        public int offset
      • length

        public int length
    • Constructor Detail

      • Chunk

        public Chunk()
        Blank constructor. Fill in your own fields.
      • Chunk

        public Chunk​(int type,
                     byte[] data,
                     int offset,
                     int length)
        Constructor with all fields.
      • Chunk

        public Chunk​(int type,
                     ByteBuffer buf)
        Construct from a ByteBuffer. The chunk is assumed to start at offset 0 and continue to the current position.