/** Removes a packet from this chunk to read as a byte array. */ protected byte[] getPacket() { return payload.dequeue(); }
/** Does this page have any packets left to read? */ protected boolean hasPacketsLeft() { return !payload.isEmpty(); }
/** * Adds a new packet. * * @param bytes the byte packet to add. */ protected void addPacket(byte[] bytes) { payload.enqueue(bytes); }