Enum Class Encoding

java.lang.Object
java.lang.Enum<Encoding>
org.refcodes.data.Encoding
All Implemented Interfaces:
Serializable, Comparable<Encoding>, Constable, org.refcodes.mixin.CodeAccessor<String>

public enum Encoding extends Enum<Encoding> implements org.refcodes.mixin.CodeAccessor<String>
The Encoding define values representing an encoding which are to be passed as argument to according methods.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>

    Nested classes/interfaces inherited from interface org.refcodes.mixin.CodeAccessor

    org.refcodes.mixin.CodeAccessor.CodeBuilder<T,B extends org.refcodes.mixin.CodeAccessor.CodeBuilder<T,B>>, org.refcodes.mixin.CodeAccessor.CodeMutator<T>, org.refcodes.mixin.CodeAccessor.CodeProperty<T>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    CP1252 (Code Page 1252) is a character encoding used in Microsoft Windows for Western European languages, such as English, French, German, Spanish, Portuguese, Italian, and others.
    This encoding is useful when having to ensure a 1-to-1 mapping between bytes and characters.
    MD5 hash encoding.
    Encoding identifying UTF-8 when working with String objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEncoding(String aEncoding)
    Determines weather the given string representation represents the according Encoding.
    static Encoding
    Returns the enum constant of this class with the specified name.
    static Encoding[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

    • UTF_8

      public static final Encoding UTF_8
      Encoding identifying UTF-8 when working with String objects.
    • ISO_8859_1

      public static final Encoding ISO_8859_1
      This encoding is useful when having to ensure a 1-to-1 mapping between bytes and characters.
    • CP1252

      public static final Encoding CP1252
      CP1252 (Code Page 1252) is a character encoding used in Microsoft Windows for Western European languages, such as English, French, German, Spanish, Portuguese, Italian, and others. CP1252 is not as widely used as it once was, as Unicode has become the dominant character encoding for modern software and the web. However, it is still important for maintaining compatibility with legacy systems and applications that use this encoding.
    • MD5

      public static final Encoding MD5
      MD5 hash encoding.
  • Method Details

    • values

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

      public static Encoding valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public String getCode()
      Specified by:
      getCode in interface org.refcodes.mixin.CodeAccessor<String>
    • isEncoding

      public boolean isEncoding(String aEncoding)
      Determines weather the given string representation represents the according Encoding.
      Parameters:
      aEncoding - The Encoding's String representation variant.
      Returns:
      True in case the given encoding represents this Encoding.