Class MagicBytesSegmentDecorator<DECORATEE extends Segment>

    • Constructor Detail

      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(DECORATEE aDecoratee,
                                          TransmissionMetrics aTransmissionMetrics)
        Enriches the provided decoratee with magic bytes of the given length to be prefixed. The configuration attributes are taken from the TransmissionMetrics configuration object, though only those attributes are supported which are also supported by the other constructors!
        Parameters:
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(String aAlias,
                                          DECORATEE aDecoratee,
                                          TransmissionMetrics aTransmissionMetrics)
        Enriches the provided decoratee with magic bytes of the given length to be prefixed. The configuration attributes are taken from the TransmissionMetrics configuration object, though only those attributes are supported which are also supported by the other constructors!
        Parameters:
        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.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(DECORATEE aDecoratee,
                                          int aMagicBytesLength)
        Enriches the provided Segment with magic bytes of the given length to be prefixed.
        Parameters:
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytesLength - The length of the magic bytes sequence.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(DECORATEE aDecoratee,
                                          String aMagicBytes)
        Enriches the provided Segment with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aDecoratee - The Segment which is 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).
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(DECORATEE aDecoratee,
                                          String aMagicBytes,
                                          Charset aCharset)
        Enriches the provided Segment with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytes - The String to be stored by this instance as magic bytes.
        aCharset - The Charset to use when converting the String to a byte array.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(DECORATEE aDecoratee,
                                          byte... aMagicBytes)
        Enriches the provided Segment with the given magic bytes being prefixed.
        Parameters:
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytes - The magic bytes to be prefixed.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(String aAlias,
                                          DECORATEE aDecoratee,
                                          int aMagicBytesLength)
        Enriches the provided Segment with magic bytes of the given length to be prefixed.
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytesLength - The length of the magic bytes sequence.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(String aAlias,
                                          DECORATEE aDecoratee,
                                          String aMagicBytes)
        Enriches the provided Segment with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The Segment which is 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).
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(String aAlias,
                                          DECORATEE aDecoratee,
                                          String aMagicBytes,
                                          Charset aCharset)
        Enriches the provided Segment with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytes - The String to be stored by this instance as magic bytes.
        aCharset - The Charset to use when converting the String to a byte array.
      • MagicBytesSegmentDecorator

        public MagicBytesSegmentDecorator​(String aAlias,
                                          DECORATEE aDecoratee,
                                          byte... aMagicBytes)
        Enriches the provided Segment with the given magic bytes being prefixed.
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The Segment which is to be prefixed with magic bytes.
        aMagicBytes - The magic bytes to be prefixed.