DECORATEE
- The decoratee type describing the decoratee subclass
decoratee.Serializable
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.DecorateeAccessor<DECORATEE>
, org.refcodes.mixin.LengthAccessor
, org.refcodes.mixin.MagicBytesAccessor
, org.refcodes.mixin.MagicBytesAccessor.MagicBytesMutator
, org.refcodes.mixin.MagicBytesAccessor.MagicBytesProperty
, org.refcodes.mixin.PayloadAccessor<DECORATEE>
, org.refcodes.mixin.PayloadAccessor.PayloadBuilder<T,PayloadTransmission<T>>
, org.refcodes.mixin.PayloadAccessor.PayloadMutator<DECORATEE>
, org.refcodes.mixin.PayloadAccessor.PayloadProperty<DECORATEE>
, MagicBytesAccessor
, MagicBytesAccessor.MagicBytesMutator
, MagicBytesAccessor.MagicBytesProperty
, MagicBytesLengthAccessor
, PayloadTransmission<DECORATEE>
, Transmission
, Transmission.TransmissionMixin
MagicBytesSectionDecorator
, MagicBytesSegmentDecorator
public abstract class AbstractMagicBytesTransmissionDecorator<DECORATEE extends Transmission> extends AbstractMagicBytesTransmission implements Transmission, org.refcodes.mixin.DecorateeAccessor<DECORATEE>
AbstractMagicBytesTransmissionDecorator
decorates a
decoratee decoratee and prefixes this decoratee instance with given magic
bytes.org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE extends Object,B extends org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE,B>>, org.refcodes.mixin.DecorateeAccessor.DecorateeMutator<DECORATEE extends Object>, org.refcodes.mixin.DecorateeAccessor.DecorateeProperty<DECORATEE extends Object>
org.refcodes.mixin.EncodingAccessor.EncodingBuilder<E extends Object,B extends org.refcodes.mixin.EncodingAccessor.EncodingBuilder<E,B>>, org.refcodes.mixin.EncodingAccessor.EncodingMutator<E extends Object>, org.refcodes.mixin.EncodingAccessor.EncodingProperty<E extends Object>
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
MagicBytesAccessor.MagicBytesBuilder<B extends MagicBytesAccessor.MagicBytesBuilder<B>>, MagicBytesAccessor.MagicBytesMutator, MagicBytesAccessor.MagicBytesProperty
MagicBytesLengthAccessor.MagicBytesLengthBuilder<B extends MagicBytesLengthAccessor.MagicBytesLengthBuilder<B>>, MagicBytesLengthAccessor.MagicBytesLengthMutator, MagicBytesLengthAccessor.MagicBytesLengthProperty
org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P extends Object,B extends org.refcodes.mixin.PayloadAccessor.PayloadBuilder<P,B>>, org.refcodes.mixin.PayloadAccessor.PayloadMutator<P extends Object>, org.refcodes.mixin.PayloadAccessor.PayloadProperty<P extends Object>
Transmission.TransmissionMixin
Modifier and Type | Field | Description |
---|---|---|
protected String |
_alias |
|
protected DECORATEE |
_decoratee |
_charset, _magicBytes, _magicBytesLength, MAGIC_BYTES, MAGIC_BYTES_TEXT
Constructor | Description |
---|---|
AbstractMagicBytesTransmissionDecorator(String aAlias,
DECORATEE aDecoratee,
byte[] aMagicBytes) |
Enriches the provided decoratee with the given magic bytes being
prefixed.
|
AbstractMagicBytesTransmissionDecorator(String aAlias,
DECORATEE aDecoratee,
int aMagicBytesLength) |
Enriches the provided decoratee with magic bytes of the given length to
be prefixed.
|
AbstractMagicBytesTransmissionDecorator(String aAlias,
DECORATEE aDecoratee,
String aMagicBytes) |
Enriches the provided decoratee with magic bytes being prefixed
(retrieved from the given
String ). |
AbstractMagicBytesTransmissionDecorator(String aAlias,
DECORATEE aDecoratee,
String aMagicBytes,
Charset aCharset) |
Enriches the provided decoratee with magic bytes being prefixed
(retrieved from the given
String ). |
AbstractMagicBytesTransmissionDecorator(String aAlias,
DECORATEE aDecoratee,
TransmissionMetrics aTransmissionMetrics) |
Enriches the provided decoratee with magic bytes of the given length to
be prefixed.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object obj) |
|
String |
getAlias() |
|
DECORATEE |
getDecoratee() |
|
int |
getLength() |
Determines the overall length of this
Transmission . |
int |
hashCode() |
|
void |
setPayload(byte[] aValue) |
Sets the magic bytes as of
AbstractMagicBytesTransmission.setMagicBytes(byte[]) . |
Schema |
toSchema() |
Retrieves the
Schema representing the Transmission . |
String |
toString() |
|
Sequence |
toTransmission() |
Provides the
Sequence representation of this
Transmission . |
getEncoding, getMagicBytes, getMagicBytesLength, getPayload, setMagicBytes, setMagicBytes, setMagicBytes, toMagicBytesString, toMagicBytesString, toSimpleTypeMap
letMagicBytes, letMagicBytes
letMagicBytes
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromInputStream, toSimpleTypeMap, transmitTo, transmitTo, transmitTo
transmitTo
protected DECORATEE extends Transmission _decoratee
protected String _alias
public AbstractMagicBytesTransmissionDecorator(String aAlias, DECORATEE aDecoratee, TransmissionMetrics aTransmissionMetrics)
TransmissionMetrics
configuration object, though only those
attributes are supported which are also supported by the other
constructors!aAlias
- The alias which identifies the content of this segment.aDecoratee
- The decoratee which to be prefixed with magic bytes.aTransmissionMetrics
- The TransmissionMetrics
to be used
for configuring this instance.public AbstractMagicBytesTransmissionDecorator(String aAlias, DECORATEE aDecoratee, int aMagicBytesLength)
aAlias
- The alias which identifies the content of this segment.aDecoratee
- The decoratee which to be prefixed with magic bytes.aMagicBytesLength
- The length of the magic bytes sequence.public AbstractMagicBytesTransmissionDecorator(String aAlias, DECORATEE aDecoratee, String aMagicBytes)
String
).aAlias
- The alias which identifies the content of this segment.aDecoratee
- The decoratee which to be prefixed with magic bytes.aMagicBytes
- The String
to be stored by this instance as
magic bytes (uses the
TransmissionMetrics.DEFAULT_ENCODING
) for byte
conversion).public AbstractMagicBytesTransmissionDecorator(String aAlias, DECORATEE aDecoratee, String aMagicBytes, Charset aCharset)
String
).public AbstractMagicBytesTransmissionDecorator(String aAlias, DECORATEE aDecoratee, byte[] aMagicBytes)
aAlias
- The alias which identifies the content of this segment.aDecoratee
- The decoratee which to be prefixed with magic bytes.aMagicBytes
- The magic bytes to be prefixed.public Sequence toTransmission()
Sequence
representation of this
Transmission
. In case of nested Transmission
instances,
all Sequence
representations from all sub-segments are
accumulated to the result as well.toTransmission
in interface Transmission
toTransmission
in class AbstractMagicBytesTransmission
Sequence
.public int getLength()
Transmission
. In case of
nested Transmission
instances, all length values from all
sub-segments are accumulated to the result as well.getLength
in interface org.refcodes.mixin.LengthAccessor
getLength
in interface Transmission
Transmission
(including any
sub-segments).public DECORATEE getDecoratee()
getDecoratee
in interface org.refcodes.mixin.DecorateeAccessor<DECORATEE extends Transmission>
public void setPayload(byte[] aValue)
AbstractMagicBytesTransmission.setMagicBytes(byte[])
. setPayload
in interface org.refcodes.mixin.PayloadAccessor.PayloadMutator<DECORATEE extends Transmission>
setPayload
in class AbstractMagicBytesTransmission
public String getAlias()
getAlias
in interface org.refcodes.mixin.AliasAccessor
getAlias
in class AbstractMagicBytesTransmission
public String toString()
toString
in class AbstractMagicBytesTransmission
public int hashCode()
hashCode
in class AbstractMagicBytesTransmission
public boolean equals(Object obj)
equals
in class AbstractMagicBytesTransmission
public Schema toSchema()
Schema
representing the Transmission
.
Retrieving a Schema
is useful when analyzing and debugging data
structures such as a AllocSectionDecoratorSegment
instance to help
document, learn and verify on the structure (as well as the content) of
that very AllocSectionDecoratorSegment
.toSchema
in interface Transmission
toSchema
in class AbstractMagicBytesTransmission
Schema
representation of the implementing type for
debugging and verification (or documentation) purposes.Copyright © 2021. All rights reserved.