Class Base32Alphabet

    • Constructor Detail

      • Base32Alphabet

        protected Base32Alphabet​(boolean littleEndian)
        Construct a new instance.
        Parameters:
        littleEndian - true if the alphabet is little-endian (LSB first), false otherwise
    • Method Detail

      • encode

        public abstract int encode​(int val)
        Encode the given 5-bit value to a code point.
        Specified by:
        encode in class Alphabet
        Parameters:
        val - the 5-bit value
        Returns:
        the Unicode code point
      • decode

        public abstract int decode​(int codePoint)
        Decode the given code point. If the code point is not valid, -1 is returned.
        Specified by:
        decode in class Alphabet
        Parameters:
        codePoint - the code point
        Returns:
        the decoded 5-bit value or -1 if the code point is not valid