Class StringSection

All Implemented Interfaces:
Serializable, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.EncodingAccessor<Charset>, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.PayloadAccessor<String>, org.refcodes.mixin.PayloadAccessor.PayloadBuilder<String,​PayloadTransmission<String>>, org.refcodes.mixin.PayloadAccessor.PayloadMutator<String>, org.refcodes.mixin.PayloadAccessor.PayloadProperty<String>, PayloadSection<String>, PayloadTransmission<String>, Section, Section.SectionMixin, Transmission, Transmission.TransmissionMixin

public class StringSection
extends AbstractPayloadSection<String>
implements PayloadSection<String>, org.refcodes.mixin.EncodingAccessor<Charset>
The StringSection is an implementation of a Section carrying a String as payload. By default, if not otherwise specified, the TransmissionMetrics.DEFAULT_ENCODING encoding is used for encoding and decoding String instances.
See Also:
Serialized Form
  • Constructor Details

    • StringSection

      public StringSection​(TransmissionMetrics aTransmissionMetrics)
      Constructs an according instance from the given configuration. 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:
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • StringSection

      public StringSection​(String aValue, TransmissionMetrics aTransmissionMetrics)
      Constructs an according instance from the given configuration. 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:
      aValue - The payload to be contained by the StringSection.
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • StringSection

      public StringSection​(String aAlias, String aValue, TransmissionMetrics aTransmissionMetrics)
      Constructs an according instance from the given configuration. 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 instance.
      aValue - The payload to be contained by the StringSection.
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • StringSection

      public StringSection()
      Constructs an empty StringSection using the TransmissionMetrics.DEFAULT_ENCODING encoding for the payload.
    • StringSection

      public StringSection​(String aValue)
      Constructs a StringSection with the given String payload being encoded with the TransmissionMetrics.DEFAULT_ENCODING.
      Parameters:
      aValue - The payload to be contained by this StringSection.
    • StringSection

      public StringSection​(Charset aCharset)
      Constructs a StringSection with a payload expected to be encoded with the given Charset.
      Parameters:
      aCharset - The Charset to be used for encoding and decoding String instances.
    • StringSection

      public StringSection​(String aValue, Charset aCharset)
      Constructs a StringSection with the given String payload being encoded with the given Charset.
      Parameters:
      aValue - The payload to be contained by this StringSection.
      aCharset - The Charset to be used for encoding the String.
    • StringSection

      public StringSection​(String aAlias, String aValue)
      Constructs a StringSection with the given String payload being encoded with the TransmissionMetrics.DEFAULT_ENCODING.
      Parameters:
      aAlias - The alias which identifies the content of this segment.
      aValue - The payload to be contained by this StringSection.
    • StringSection

      public StringSection​(String aAlias, String aValue, Charset aCharset)
      Constructs a StringSection with the given String payload being encoded with the given Charset.
      Parameters:
      aAlias - The alias which identifies the content of this segment.
      aValue - The payload to be contained by this StringSection.
      aCharset - The Charset to be used for encoding the String.
  • Method Details