Interface DataTypeWithCharset

    • Method Detail

      • encodeCharacterValue

        default byte[] encodeCharacterValue​(java.lang.Object value,
                                            MemBuffer buf,
                                            Settings settings)
                                     throws DataTypeEncodeException
        Utility for character data types to encode a value.
        Parameters:
        value - the character value to encode.
        buf - a buffer representing the eventual destination of the bytes.
        settings - the settings to use.
        Returns:
        the encoded value
        Throws:
        DataTypeEncodeException - if the value cannot be encoded
      • encodeCharacterRepresentation

        default byte[] encodeCharacterRepresentation​(java.lang.String repr,
                                                     MemBuffer buf,
                                                     Settings settings)
                                              throws DataTypeEncodeException
        Utility for character data types to encode a representation.
        Parameters:
        repr - the single-character string to encode.
        buf - a buffer representing the eventual destination of the bytes.
        settings - the settings to use.
        Returns:
        the encoded value
        Throws:
        DataTypeEncodeException - if the value cannot be encoded
      • getCharsetName

        default java.lang.String getCharsetName​(Settings settings)
        Get the character set for a specific data type and settings
        Parameters:
        settings - data instance settings
        Returns:
        Charset for this datatype and settings