Enum Class OrderMarkPolicy
- All Implemented Interfaces:
Serializable,Comparable<OrderMarkPolicy>,Constable
Determines how the BOM (byte order mark)
should be handled when reading and writing
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen reading: Always read a BOM (fail if one is not present) When writing: Always write a BOMWhen reading: Read a BOM only if one exists When writing: Write a BOM only if the document was previously read and contained a BOMWhen reading: Never attempt to read a BOM (fail if one is present) When writing: Never write a BOM -
Method Summary
Modifier and TypeMethodDescriptionstatic OrderMarkPolicyReturns the enum constant of this class with the specified name.static OrderMarkPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEVER
- When reading: Never attempt to read a BOM (fail if one is present)
- When writing: Never write a BOM
-
ALWAYS
- When reading: Always read a BOM (fail if one is not present)
- When writing: Always write a BOM
-
IF_PRESENT
- When reading: Read a BOM only if one exists
- When writing: Write a BOM only if the document was previously read and contained a BOM
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-