Class CipShortSTRING

    • Field Detail

      • encoding

        protected java.nio.charset.Charset encoding
    • Constructor Detail

      • CipShortSTRING

        public CipShortSTRING()
      • CipShortSTRING

        public CipShortSTRING​(java.lang.String s)
      • CipShortSTRING

        public CipShortSTRING​(java.lang.String s,
                              java.nio.charset.Charset enc)
      • CipShortSTRING

        public CipShortSTRING​(int[] dimensions)
      • CipShortSTRING

        public CipShortSTRING​(int[] dimensions,
                              java.nio.charset.Charset enc)
      • CipShortSTRING

        public CipShortSTRING​(BaseDataType<?> data,
                              int... indices)
      • CipShortSTRING

        public CipShortSTRING​(BaseDataType<?> data,
                              java.nio.charset.Charset enc,
                              int... indices)
      • CipShortSTRING

        protected CipShortSTRING​(CipShortSTRING data,
                                 int[] indices)
    • Method Detail

      • minEach

        public int minEach()
        Description copied from class: BaseDataType
        Obtain the smallest number of bytes a single item can occupy in encoded form. Used in structures to compute min/max offset and total structure size range.

        Types where bytesEach is a constant should override this to return that constant too, as a performance optimization.

        Overrides:
        minEach in class BaseDataType<java.lang.String>
        Returns:
      • maxEach

        public int maxEach()
        Description copied from class: BaseDataType
        Obtain the largest number of bytes a single item can occupy in encoded form. Used in structures to compute min/max offset and total structure size range.

        Types where bytesEach is a constant should override this to return that constant too, as a performance optimization.

        Overrides:
        maxEach in class BaseDataType<java.lang.String>
        Returns:
      • getNestingDef

        public DataDefinitionSeg getNestingDef()
        Description copied from class: BaseDataType
        Return the element (not including array) type definition as a Path Segment, using the abbreviated form if a composite data type.
        Specified by:
        getNestingDef in class BaseDataType<java.lang.String>
      • crcName

        public java.lang.String crcName()
        Description copied from class: BaseDataType
        Obtain the name of this type as used for computing structure CRCs. Can be different from the name(s) used by the CipPath parser.
        Overrides:
        crcName in class BaseDataType<java.lang.String>
        Returns:
      • setPayloadImpl

        protected void setPayloadImpl​(java.nio.ByteBuffer source,
                                      int[] indices)
        Description copied from class: BaseDataType
        All concrete implementations must supply their per-element decoder here.
        Specified by:
        setPayloadImpl in class BaseDataType<java.lang.String>
      • putPayloadImpl

        protected void putPayloadImpl​(java.nio.ByteBuffer dest,
                                      int[] indices)
        Description copied from class: BaseDataType
        All concrete implementations must supply their per-element encoder here.
        Specified by:
        putPayloadImpl in class BaseDataType<java.lang.String>
      • getCharset

        public java.nio.charset.Charset getCharset()
        Specified by:
        getCharset in class BaseString
      • bytesImpl

        protected int bytesImpl​(int[] indices)
        Description copied from class: BaseDataType
        Retrieve the bytes payload size of a single array element (or sole element). Objects with fixed element sizes may simply return bytesEach() here.
        Specified by:
        bytesImpl in class BaseDataType<java.lang.String>
        Returns:
      • wrap

        public CipShortSTRING wrap​(int[] indices)
        Description copied from class: BaseDataType
        Application-side wrapper for inner dimensions. Implementations must update memberOffsets if not not using the protected constructor.
        Specified by:
        wrap in class BaseDataType<java.lang.String>
        Parameters:
        indices - Array subscripts. Missing subscripts are allowed.