Interface Segment

All Superinterfaces:
org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Schemable<SerialSchema>, Serializable, Transmission
All Known Subinterfaces:
ArraySegment<SEGMENT>, DecoratorSegment<DECORATEE>, PayloadSegment<T>, Segment.SegmentMixin
All Known Implementing Classes:
AbstractLengthDecoratorSegment, AbstractPayloadSegment, AbstractReferenceeLengthSegment, AbstractSegmentDecorator, AllocSectionDecoratorSegment, AllocSegmentBody, AllocSegmentHead, AsciizArraySegment, AsciizSegment, AssertMagicBytesSegment, AssertMagicBytesSegmentDecorator, BooleanSegment, BreakerSegmentDecorator, ByteSegment, CipherSegmentDecorator, ComplexTypeSegment, CrcSegmentDecorator, DoubleSegment, DynamicTypeSegment, EnumSegment, FixedLengthSequenceSegment, FloatSegment, IntSegment, InvertibleSegmentDecorator, LengthSegment, LengthSegmentDecoratorSegment, LongSegment, MagicBytesSegment, MagicBytesSegmentDecorator, MagicBytesSegmentMultiplexer, NullSegment, NumberSegment, ReadyToReceiveSegmentDecorator, ReadyToSendSegmentDecorator, SegmentComposite, SequenceNumberSegment, ShortSegment, StopAndWaitPacketStreamSegmentDecorator, StopAndWaitSegmentDecorator, StringSegment

public interface Segment extends Transmission
The Segment interface enables an implementing type to provide a Sequence representation of itself or to transmit its Sequence representation through an OutputStream (with an optional feedback InputStream) as of Transmission.transmitTo(OutputStream, InputStream) and to initialize with a Sequence representation for itself or to receive a Sequence representation for itself through an InputStream (with an optional feedback OutputStream) as of receiveFrom(InputStream, OutputStream). A Segment has a predictable length or it can (by itself) determine itself's length.