FileDocCategorySizeDatePackage
ByteOrder.javaAPI DocAndroid 1.5 API2333Wed May 06 22:41:04 BST 2009java.nio

ByteOrder

public final class ByteOrder extends Object
Defines byte order constants.
since
Android 1.0

Fields Summary
public static final ByteOrder
BIG_ENDIAN
This constant represents big endian.
public static final ByteOrder
LITTLE_ENDIAN
This constant represents little endian.
private static final ByteOrder
NATIVE_ORDER
private final String
name
Constructors Summary
private ByteOrder(String name)

        super();
        this.name = name;
    
Methods Summary
public static java.nio.ByteOrdernativeOrder()
Returns the current platform byte order.

return
the byte order object, which is either LITTLE_ENDIAN or BIG_ENDIAN.
since
Android 1.0


     
        if (Platform.getMemorySystem().isLittleEndian()) {
            NATIVE_ORDER = LITTLE_ENDIAN;
        } else {
            NATIVE_ORDER = BIG_ENDIAN;
        }
    
        return NATIVE_ORDER;
    
public java.lang.StringtoString()
Returns a string that describes this object.

return
"BIG_ENDIAN" for {@link #BIG_ENDIAN ByteOrder.BIG_ENDIAN} objects, "LITTLE_ENDIAN" for {@link #LITTLE_ENDIAN ByteOrder.LITTLE_ENDIAN} objects.
since
Android 1.0

        return name;