Package com.helger.mail.cte
Enum EContentTransferEncoding
- java.lang.Object
-
- java.lang.Enum<EContentTransferEncoding>
-
- com.helger.mail.cte.EContentTransferEncoding
-
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,IContentTransferEncoding,Serializable,Comparable<EContentTransferEncoding>
public enum EContentTransferEncoding extends Enum<EContentTransferEncoding> implements IContentTransferEncoding
Predefined Content Transfer Encoding types as per https://www.ietf.org/rfc/rfc2045.txt section 6.1.
Of course additional transfer encodings can be used.Three transformations are currently defined: identity, the "quoted- printable" encoding, and the "base64" encoding. The domains are "binary", "8bit" and "7bit".
The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all mean that the identity (i.e. NO) encoding transformation has been performed. As such, they serve simply as indicators of the domain of the body data, and provide useful information about the sort of encoding that might be needed for transmission in a given transport system.
- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description _7BIT"7bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]._8BIT"8bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]), but octets with decimal values greater than 127 may be used.BASE64BINARY"Binary data" refers to data where any sequence of octets whatsoever is allowed.QUOTED_PRINTABLE
-
Field Summary
Fields Modifier and Type Field Description static EContentTransferEncodingAS2_DEFAULTAS2 default CTE is "binary"
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EContentTransferEncodinggetFromIDCaseInsensitiveOrDefault(String sID, EContentTransferEncoding eDefault)static EContentTransferEncodinggetFromIDCaseInsensitiveOrNull(String sID)StringgetID()static EContentTransferEncodingvalueOf(String name)Returns the enum constant of this type with the specified name.static EContentTransferEncoding[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.helger.mail.cte.IContentTransferEncoding
createCodec
-
-
-
-
Enum Constant Detail
-
_7BIT
public static final EContentTransferEncoding _7BIT
"7bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]. No octets with decimal values greater than 127 are allowed and neither are NULs (octets with decimal value 0). CR (decimal value 13) and LF (decimal value 10) octets only occur as part of CRLF line separation sequences.
-
_8BIT
public static final EContentTransferEncoding _8BIT
"8bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]), but octets with decimal values greater than 127 may be used. As with "7bit data" CR and LF octets only occur as part of CRLF line separation sequences and no NULs are allowed.
-
BINARY
public static final EContentTransferEncoding BINARY
"Binary data" refers to data where any sequence of octets whatsoever is allowed.
-
QUOTED_PRINTABLE
public static final EContentTransferEncoding QUOTED_PRINTABLE
-
BASE64
public static final EContentTransferEncoding BASE64
-
-
Field Detail
-
AS2_DEFAULT
public static final EContentTransferEncoding AS2_DEFAULT
AS2 default CTE is "binary"
-
-
Method Detail
-
values
public static EContentTransferEncoding[] 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 (EContentTransferEncoding c : EContentTransferEncoding.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EContentTransferEncoding 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 nameNullPointerException- if the argument is null
-
getID
@Nonnull @Nonempty public String getID()
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
getFromIDCaseInsensitiveOrNull
@Nullable public static EContentTransferEncoding getFromIDCaseInsensitiveOrNull(@Nullable String sID)
-
getFromIDCaseInsensitiveOrDefault
@Nullable public static EContentTransferEncoding getFromIDCaseInsensitiveOrDefault(@Nullable String sID, @Nullable EContentTransferEncoding eDefault)
-
-