com.j256.simplemagic.endian
Enum EndianType

java.lang.Object
  extended by java.lang.Enum<EndianType>
      extended by com.j256.simplemagic.endian.EndianType
All Implemented Interfaces:
Serializable, Comparable<EndianType>

public enum EndianType
extends Enum<EndianType>

Types of endian supported by the system.

Author:
graywatson

Enum Constant Summary
BIG
          big endian, also called network byte order (motorola 68k)
LITTLE
          little endian (x86)
MIDDLE
          old PDP11 byte order
NATIVE
          uses the byte order of the current system
 
Method Summary
 EndianConverter getConverter()
          Returns the converter associated with this endian-type.
static EndianType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EndianType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BIG

public static final EndianType BIG
big endian, also called network byte order (motorola 68k)


LITTLE

public static final EndianType LITTLE
little endian (x86)


MIDDLE

public static final EndianType MIDDLE
old PDP11 byte order


NATIVE

public static final EndianType NATIVE
uses the byte order of the current system

Method Detail

values

public static EndianType[] 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 (EndianType c : EndianType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EndianType 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 name
NullPointerException - if the argument is null

getConverter

public EndianConverter getConverter()
Returns the converter associated with this endian-type.



This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.