Enum Class StringEncoding

java.lang.Object
java.lang.Enum<StringEncoding>
com.pnfsoftware.jeb.core.units.code.asm.type.StringEncoding
All Implemented Interfaces:
Serializable, Comparable<StringEncoding>, Constable

@Ser public enum StringEncoding extends Enum<StringEncoding>
Types of string encoding.
  • Enum Constant Details

    • ASCII_ZERO

      public static final StringEncoding ASCII_ZERO
      Zero-terminated US-ASCII string.
    • UTF8_ZERO

      public static final StringEncoding UTF8_ZERO
      Zero-terminated UTF-8 string.
    • UTF16_LE_ZERO

      public static final StringEncoding UTF16_LE_ZERO
      Zero-terminated little-endian UTF-16 string.
    • UTF16_BE_ZERO

      public static final StringEncoding UTF16_BE_ZERO
      Zero-terminated big-endian UTF-16 string.
    • UTF16_ZERO

      public static final StringEncoding UTF16_ZERO
      Zero-terminated UTF-16 string.
    • UTF8_NONZERO

      public static final StringEncoding UTF8_NONZERO
      Non-zero-terminated UTF-8 string.
  • Method Details

    • values

      public static StringEncoding[] 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 StringEncoding 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
    • getBasicCharSize

      public int getBasicCharSize()
      Retrieve the basic character size.
      Returns:
      character size in bytes
    • getCharset

      public Charset getCharset()
      Retrieve the Java charset.
      Returns:
      charset
    • isZeroTerminated

      public boolean isZeroTerminated()
      Determine whether strings use a zero terminator.
      Returns:
      true for zero-terminated strings
    • getEncodingPrefix

      public String getEncodingPrefix()
      Retrieve the source literal encoding prefix.
      Returns:
      encoding prefix, possibly empty