Package com.helger.commons.mime
Enum EMimeQuoting
- All Implemented Interfaces:
Serializable,Comparable<EMimeQuoting>,java.lang.constant.Constable
Defines the possible MIME type parameter value quotings
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCreate a quoted printable String.Create a quoted string according to RFC 822 (surrounding everything in double-quotes and masking using backslash).
Example:foo barresults in"foo bar"Create a URL escaped String. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final char -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetQuotedString(String sUnquotedString) abstract StringgetUnquotedString(String sQuotedString) booleanstatic EMimeQuotingReturns the enum constant of this type with the specified name.static EMimeQuoting[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
QUOTED_STRING
Create a quoted string according to RFC 822 (surrounding everything in double-quotes and masking using backslash).
Example:foo barresults in"foo bar" -
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 barresults infoo=20bar -
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 barresults infoo%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
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
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 nameNullPointerException- if the argument is null
-
getQuotedString
-
getUnquotedString
-
isQuotedString
public boolean isQuotedString()- Returns:
trueif this ==QUOTED_STRING,falseotherwise.
-