Class AssertMagicBytesSegment

All Implemented Interfaces:
Serializable, org.refcodes.mixin.AliasAccessor, 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<SerialSchema>, MagicBytesAccessor, MagicBytesAccessor.MagicBytesMutator, MagicBytesAccessor.MagicBytesProperty, MagicBytesLengthAccessor, PayloadTransmission<byte[]>, Segment, Segment.SegmentMixin, Transmission, Transmission.TransmissionMixin

public class AssertMagicBytesSegment extends MagicBytesSegment
The AssertMagicBytesSegment extends the MagicBytesSegment and enforces the configured magic bytes to match the received magic bytes (as of Segment.fromTransmission(Sequence) and Segment.SegmentMixin.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: