Class Base64Alphabet

java.lang.Object
org.wildfly.common.codec.Alphabet
org.wildfly.common.codec.Base64Alphabet

public abstract class Base64Alphabet extends Alphabet
A base-64 alphabet.
See Also:
  • Field Details

  • Constructor Details

    • Base64Alphabet

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

    • 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