Interface CharCodec

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    BCDCharCodec, BinaryCharCodec

    public interface CharCodec
    extends Serializable
    Interface CharCodec is an abstraction of alternative encodings of characters. Its implementations are used in the encoding of Strings to support vendor-specific variations in address fields.
    • Method Detail

      • encodeChar

        int encodeChar​(char ch)
        Gets the encoded value for a character.
        Parameters:
        ch - the character to encode
        Returns:
        the encoded form of the character
        Throws:
        UnsupportedDigitException - if the character is not supported by this encoding
      • decodeChar

        char decodeChar​(int digit)
        Gets the decoded character from an encoded value.
        Parameters:
        digit - the encoded form of the character.
        Returns:
        the decoded character
        Throws:
        UnsupportedDigitException - if the character is not supported by this encoding