Class UnknownChunk

  • All Implemented Interfaces:
    SerializableResource

    public final class UnknownChunk
    extends Chunk
    A chunk whose contents are unknown. This is a placeholder until we add a proper chunk for the unknown type.
    • Constructor Detail

      • UnknownChunk

        protected UnknownChunk​(java.nio.ByteBuffer buffer,
                               @Nullable
                               Chunk parent)
    • Method Detail

      • writeHeader

        protected void writeHeader​(java.nio.ByteBuffer output)
        Description copied from class: Chunk
        Writes the remaining header (after the type, headerSize, and chunkSize).
        Overrides:
        writeHeader in class Chunk
        Parameters:
        output - The buffer that the header will be written to.
      • writePayload

        protected void writePayload​(java.io.DataOutput output,
                                    java.nio.ByteBuffer header,
                                    boolean shrink)
                             throws java.io.IOException
        Description copied from class: Chunk
        Writes the chunk payload. The payload is data in a chunk which is not in the first headerSize bytes of the chunk.
        Overrides:
        writePayload in class Chunk
        Parameters:
        output - The stream that the payload will be written to.
        header - The already-written header. This can be modified to fix payload offsets.
        shrink - True if this payload should be optimized for size.
        Throws:
        java.io.IOException - Thrown if output could not be written to (out of memory).