Name
ByteOrder
Synopsis
This
class is a type-safe enumeration of byte
orders, and is used by the ByteBuffer class. The
two constant fields define the two legal byte order values:
BIG_ENDIAN
byte order means most-significant-byte
first. LITTLE_ENDIAN means least-significant-byte
first. The static nativeOrder(
)
method returns whichever of these
two constants represents the native byte order of the underlying
operating system and hardware. Finally, the toString(
)
method
returns the string “BIG_ENDIAN” or “LITTLE_ENDIAN”.
public final class ByteOrder { // No Constructor // Public Constants public static final ByteOrder BIG_ENDIAN; public static final ByteOrder LITTLE_ENDIAN; // Public Class Methods public static ByteOrder nativeOrder( ); // Public Methods Overriding Object public String toString( ); }
Passed To
ByteBuffer.order( )
Returned By
ByteBuffer.order( ), CharBuffer.order(
), DoubleBuffer.order( ),
FloatBuffer.order( ), IntBuffer.order(
), LongBuffer.order( ),
ShortBuffer.order( )
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access