Enum EMimeQuoting

java.lang.Object
java.lang.Enum<EMimeQuoting>
com.helger.commons.mime.EMimeQuoting
All Implemented Interfaces:
Serializable, Comparable<EMimeQuoting>, java.lang.constant.Constable

public enum EMimeQuoting extends Enum<EMimeQuoting>
Defines the possible MIME type parameter value quotings
Author:
Philip Helger
  • Enum Constant Details

    • QUOTED_STRING

      public static final EMimeQuoting QUOTED_STRING
      Create a quoted string according to RFC 822 (surrounding everything in double-quotes and masking using backslash).
      Example: foo bar results in "foo bar"
    • QUOTED_PRINTABLE

      public static final EMimeQuoting QUOTED_PRINTABLE
      Create a quoted printable String. Replace all non-printable characters with =XY where XY is the hex encoding of the char.
      Example: foo bar results in foo=20bar
    • URL_ESCAPE

      public static final EMimeQuoting URL_ESCAPE
      Create a URL escaped String. Replace all non-printable characters with %XY where XY is the hex encoding of the char. Special note: space (ASCII 20) should be escaped as "%20" and not as "+".
      Example: foo bar results in foo%20bar
  • Field Details

    • QUOTED_STRING_SEPARATOR_CHAR

      public static final char QUOTED_STRING_SEPARATOR_CHAR
      See Also:
    • QUOTED_STRING_MASK_CHAR

      public static final char QUOTED_STRING_MASK_CHAR
      See Also:
  • Method Details

    • values

      public static EMimeQuoting[] 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 EMimeQuoting 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
    • getQuotedString

      @Nonnull @Nonempty public abstract String getQuotedString(@Nonnull @Nonempty String sUnquotedString)
    • getUnquotedString

      @Nonnull @Nonempty public abstract String getUnquotedString(@Nonnull @Nonempty String sQuotedString)
    • isQuotedString

      public boolean isQuotedString()
      Returns:
      true if this == QUOTED_STRING, false otherwise.