Enum Class ByteOrderOption

java.lang.Object
java.lang.Enum<ByteOrderOption>
io.smallrye.common.io.ByteOrderOption
All Implemented Interfaces:
Serializable, Comparable<ByteOrderOption>, Constable, OpenOption

public enum ByteOrderOption extends Enum<ByteOrderOption> implements 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.

  • Enum Constant Details

  • Method Details

    • values

      public static ByteOrderOption[] 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

      public static ByteOrderOption valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • byteOrder

      public ByteOrder byteOrder()
      Returns the byte order corresponding to this option.
      Returns:
      the byte order corresponding to this option
    • of

      public static ByteOrderOption of(ByteOrder byteOrder)
      Returns the byte order option corresponding to the given byte order.
      Parameters:
      byteOrder - the byte order (must not be null)
      Returns:
      the byte order option corresponding to the given byte order
    • ofNative

      public static ByteOrderOption 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