Enum JDKStringConverter

    • Field Detail

      • type

        private java.lang.Class<?> type
        The type.
      • base64Str

        private static java.lang.String base64Str
      • base64Array

        private static char[] base64Array
    • Constructor Detail

      • JDKStringConverter

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

      • values

        public static JDKStringConverter[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JDKStringConverter c : JDKStringConverter.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JDKStringConverter 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
      • getType

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

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

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

        private static java.lang.String printBase64Binary​(byte[] array)
      • parseBase64Binary

        private static byte[] parseBase64Binary​(java.lang.String str)