Package java.nio

Class ByteOrder

java.lang.Object
java.nio.ByteOrder

public final class ByteOrder
extends Object
Defines byte order constants.
  • Field Details

    • BIG_ENDIAN

      public static final ByteOrder BIG_ENDIAN
      This constant represents big endian.
    • LITTLE_ENDIAN

      public static final ByteOrder LITTLE_ENDIAN
      This constant represents little endian.
    • needsSwap

      public final boolean needsSwap
      This is the only thing that ByteOrder is really used for: to know whether we need to swap bytes to get this order, given bytes in native order. (That is, this is the opposite of the hypothetical "isNativeOrder".)
  • Method Details