Package org.geolatte.geom
Enum ByteOrder
- java.lang.Object
-
- java.lang.Enum<ByteOrder>
-
- org.geolatte.geom.ByteOrder
-
- All Implemented Interfaces:
Serializable,Comparable<ByteOrder>
public enum ByteOrder extends Enum<ByteOrder>
Indicates the byte-order for aByteBuffer.- Author:
- Karel Maesen, Geovise BVBA
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description bytebyteValue()Returns the byte order as a byte: 0 for XDR (big endian), 1 for NDR (little endian).ByteOrdergetByteOrder()Returns the correspondingjava.nio.ByteOrderstatic ByteOrdervalueOf(byte orderByte)Returns theByteOrder corresponding to the specified orderByte.static ByteOrdervalueOf(String name)Returns the enum constant of this type with the specified name.static ByteOrdervalueOf(ByteOrder byteOrder)Returns theByteOrder corresponding to the specifiedByteOrder.static ByteOrder[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ByteOrder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ByteOrder c : ByteOrder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ByteOrder valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
valueOf
public static ByteOrder valueOf(byte orderByte)
Returns theByteOrder corresponding to the specified orderByte.- Parameters:
orderByte- (0 or 1)- Returns:
- corresponding
ByteOrder, resp.XDRorNDR.
-
getByteOrder
public ByteOrder getByteOrder()
Returns the correspondingjava.nio.ByteOrder- Returns:
- the corresponding
java.nio.ByteOrder
-
byteValue
public byte byteValue()
Returns the byte order as a byte: 0 for XDR (big endian), 1 for NDR (little endian).- Returns:
- byte 0 or 1
-
-