Enum Base64Dialect

java.lang.Object
java.lang.Enum<Base64Dialect>
io.netty.handler.codec.base64.Base64Dialect
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Base64Dialect>

public enum Base64Dialect extends java.lang.Enum<Base64Dialect>
Enumeration of supported Base64 dialects.

The internal lookup tables in this class has been derived from Robert Harder's Public Domain Base64 Encoder/Decoder.

  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Special "ordered" dialect of Base64 described in RFC1940.
    Standard Base64 encoding as described in the Section 3 of RFC3548.
    Base64-like encoding that is URL-safe as described in the Section 4 of RFC3548.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final byte[]
     
    (package private) final boolean
     
    (package private) final byte[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Base64Dialect(byte[] alphabet, byte[] decodabet, boolean breakLinesByDefault)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    valueOf(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Base64Dialect[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • STANDARD

      public static final Base64Dialect STANDARD
      Standard Base64 encoding as described in the Section 3 of RFC3548.
    • URL_SAFE

      public static final Base64Dialect URL_SAFE
      Base64-like encoding that is URL-safe as described in the Section 4 of RFC3548. It is important to note that data encoded this way is not officially valid Base64, or at the very least should not be called Base64 without also specifying that is was encoded using the URL-safe dialect.
    • ORDERED

      public static final Base64Dialect ORDERED
      Special "ordered" dialect of Base64 described in RFC1940.
  • Field Details

    • alphabet

      final byte[] alphabet
    • decodabet

      final byte[] decodabet
    • breakLinesByDefault

      final boolean breakLinesByDefault
  • Constructor Details

    • Base64Dialect

      private Base64Dialect(byte[] alphabet, byte[] decodabet, boolean breakLinesByDefault)
  • Method Details

    • values

      public static Base64Dialect[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Base64Dialect valueOf(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null