Class XmlResourceMapChunk

  • All Implemented Interfaces:
    SerializableResource

    public class XmlResourceMapChunk
    extends Chunk
    Represents an XML resource map chunk.

    This chunk maps attribute ids to the resource ids of the attribute resource that defines the attribute (e.g. type, enum values, etc.).

    • Constructor Detail

      • XmlResourceMapChunk

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

      • init

        protected void init​(java.nio.ByteBuffer buffer)
        Description copied from class: Chunk
        Finishes initialization of a chunk. This should be called immediately after the constructor. This is separate from the constructor so that the header of a chunk can be fully initialized before the payload of that chunk is initialized for chunks that require such behavior.
        Overrides:
        init in class Chunk
        Parameters:
        buffer - The buffer that the payload will be initialized from.
      • getResourceId

        public BinaryResourceIdentifier getResourceId​(int attributeId)
        Returns the resource ID that this attributeId maps 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).