Interface ExtraField.Segment
-
- All Known Implementing Classes:
ExtraField.AlignmentSegment,ExtraField.RawDataSegment
- Enclosing class:
- ExtraField
public static interface ExtraField.SegmentField inside the extra field. A segment contains a header ID and data. Specific types of segments implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetHeaderId()Obtains the segment's header ID.intsize()Obtains the size of the segment including the header ID.voidwrite(java.nio.ByteBuffer out)Writes the segment to a buffer.
-
-
-
Method Detail
-
getHeaderId
int getHeaderId()
Obtains the segment's header ID.- Returns:
- the segment's header ID
-
size
int size()
Obtains the size of the segment including the header ID.- Returns:
- the number of bytes needed to write the segment
-
write
void write(java.nio.ByteBuffer out) throws java.io.IOExceptionWrites the segment to a buffer.- Parameters:
out- the buffer where to write the segment to; exactlysize()bytes will be written- Throws:
java.io.IOException- failed to write segment data
-
-