Class AssertMagicBytesSegmentDecorator<DECORATEE extends Segment>

Type Parameters:
DECORATEE - The Segment type describing the Segment subclass decoratee.
All Implemented Interfaces:
Serializable, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.DecorateeAccessor<DECORATEE>, org.refcodes.mixin.EncodingAccessor<Charset>, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.MagicBytesAccessor, org.refcodes.mixin.MagicBytesAccessor.MagicBytesMutator, org.refcodes.mixin.MagicBytesAccessor.MagicBytesProperty, org.refcodes.mixin.PayloadAccessor<byte[]>, org.refcodes.mixin.PayloadAccessor.PayloadBuilder<byte[],PayloadTransmission<byte[]>>, org.refcodes.mixin.PayloadAccessor.PayloadMutator<byte[]>, org.refcodes.mixin.PayloadAccessor.PayloadProperty<byte[]>, org.refcodes.mixin.Schemable, DecoratorSegment<DECORATEE>, MagicBytesAccessor, MagicBytesAccessor.MagicBytesMutator, MagicBytesAccessor.MagicBytesProperty, MagicBytesLengthAccessor, PayloadTransmission<byte[]>, Segment, Segment.SegmentMixin, Transmission, Transmission.TransmissionMixin

public class AssertMagicBytesSegmentDecorator<DECORATEE extends Segment> extends MagicBytesSegmentDecorator<DECORATEE>
The AssertMagicBytesSegmentDecorator extends the MagicBytesSegmentDecorator and enforces the configured magic bytes to match the received magic bytes (as of Segment.fromTransmission(Sequence) and receiveFrom(java.io.InputStream, java.io.OutputStream) or the like). In case the assertion of the configured magic bytes fails during receiving, then a BadMagicBytesException or BadMagicBytesSequenceException is thrown.
See Also: