Class AssertMagicBytesSectionDecorator<DECORATEE extends Section>

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<SerialSchema>, DecoratorSection<DECORATEE>, MagicBytesAccessor, MagicBytesAccessor.MagicBytesMutator, MagicBytesAccessor.MagicBytesProperty, MagicBytesLengthAccessor, PayloadTransmission<byte[]>, Section, Section.SectionMixin, Transmission, Transmission.TransmissionMixin

public class AssertMagicBytesSectionDecorator<DECORATEE extends Section> extends MagicBytesSectionDecorator<DECORATEE>
The AssertMagicBytesSectionDecorator extends the MagicBytesSectionDecorator and enforces the configured magic bytes to match the received magic bytes (as of fromTransmission(Sequence, int, int) and receiveFrom(java.io.InputStream, int, 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: