- All Implemented Interfaces:
Serializable,Comparable<ByteOrderOption>,Constable,OpenOption
An
OpenOption that specifies the default byte order to use when opening a BufferedFile.
If no ByteOrderOption is specified, the native byte order is used.
Specifying both BIG_ENDIAN and LITTLE_ENDIAN in the same set of open options
will generally cause an IllegalArgumentException to be thrown.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the byte order corresponding to this option.static ByteOrderOptionReturns the byte order option corresponding to the given byte order.static ByteOrderOptionofNative()Returns the byte order option corresponding to the native byte order of the current JVM instance.static ByteOrderOptionReturns the enum constant of this class with the specified name.static ByteOrderOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BIG_ENDIAN
Use big-endian byte order. -
LITTLE_ENDIAN
Use little-endian byte order.
-
-
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
-
byteOrder
Returns the byte order corresponding to this option.- Returns:
- the byte order corresponding to this option
-
of
Returns the byte order option corresponding to the given byte order.- Parameters:
byteOrder- the byte order (must not benull)- Returns:
- the byte order option corresponding to the given byte order
-
ofNative
Returns the byte order option corresponding to the native byte order of the current JVM instance.- Returns:
- the byte order option corresponding to the native byte order of the current JVM instance
-