Class Base64Alphabet

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Base64Alphabet​(boolean littleEndian)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract int decode​(int codePoint)
      Decode the given code point.
      abstract int encode​(int val)
      Encode the given 6-bit value to a code point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Base64Alphabet

        protected Base64Alphabet​(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 6-bit value to a code point.
        Specified by:
        encode in class Alphabet
        Parameters:
        val - the 6-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 6-bit value or -1 if the code point is not valid