Class ExtraField.RawDataSegment

  • All Implemented Interfaces:
    ExtraField.Segment
    Enclosing class:
    ExtraField

    public static class ExtraField.RawDataSegment
    extends java.lang.Object
    implements ExtraField.Segment
    Segment of raw data: this class represents a general segment containing an array of bytes as data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHeaderId()
      Obtains the segment's header ID.
      int size()
      Obtains the size of the segment including the header ID.
      void write​(java.nio.ByteBuffer out)
      Writes the segment to a buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • write

        public void write​(java.nio.ByteBuffer out)
                   throws java.io.IOException
        Description copied from interface: ExtraField.Segment
        Writes the segment to a buffer.
        Specified by:
        write in interface ExtraField.Segment
        Parameters:
        out - the buffer where to write the segment to; exactly ExtraField.Segment.size() bytes will be written
        Throws:
        java.io.IOException - failed to write segment data
      • size

        public int size()
        Description copied from interface: ExtraField.Segment
        Obtains the size of the segment including the header ID.
        Specified by:
        size in interface ExtraField.Segment
        Returns:
        the number of bytes needed to write the segment