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( )
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.