Enum JDKStringConverter

java.lang.Object
java.lang.Enum<JDKStringConverter>
org.joda.convert.JDKStringConverter
All Implemented Interfaces:
Serializable, Comparable<JDKStringConverter>, java.lang.constant.Constable, FromStringConverter<Object>, StringConverter<Object>, ToStringConverter<Object>, TypedFromStringConverter<Object>, TypedStringConverter<Object>

enum JDKStringConverter extends Enum<JDKStringConverter> implements TypedStringConverter<Object>
Conversion between JDK classes and a String.
  • Enum Constant Details

  • Field Details

    • type

      private Class<?> type
      The type.
    • base64Str

      private static String base64Str
    • base64Array

      private static char[] base64Array
    • MASK_8BIT

      private static final int MASK_8BIT
      See Also:
    • MASK_6BIT

      private static final int MASK_6BIT
      See Also:
  • Constructor Details

    • JDKStringConverter

      private JDKStringConverter(Class<?> type)
      Creates an enum.
      Parameters:
      type - the type, not null
  • Method Details

    • values

      public static JDKStringConverter[] 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 JDKStringConverter valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      Class<?> getType()
      Gets the type of the converter.
      Returns:
      the type, not null
    • getEffectiveType

      public Class<?> getEffectiveType()
      Gets the type of the converter.
      Specified by:
      getEffectiveType in interface TypedFromStringConverter<Object>
      Specified by:
      getEffectiveType in interface TypedStringConverter<Object>
      Returns:
      the type, not null
    • convertToString

      public String convertToString(Object object)
      Description copied from interface: ToStringConverter
      Converts the specified object to a String.
      Specified by:
      convertToString in interface ToStringConverter<Object>
      Parameters:
      object - the object to convert, not null
      Returns:
      the converted string, may be null but generally not
    • printBase64Binary

      private static String printBase64Binary(byte[] array)
    • parseBase64Binary

      private static byte[] parseBase64Binary(String str)