| java.lang.Object org.sakaiproject.metaobj.utils.id.guid.ByteOrder
ByteOrder | public class ByteOrder (Code) | | Various static routines for solving endian problems.
|
Method Summary | |
public static void | int2leb(int x, byte[] buf, int offset) | public static int | leb2int(byte[] x, int offset) | public static short | leb2short(byte[] x, int offset) | public static int | long2int(long l) Returns the int value that is closest to l. | public static byte[] | reverse(byte[] x) Returns the reverse of x. | public static void | short2leb(short x, byte[] buf, int offset) | public static int | ubyte2int(byte x) Interprets the value of x as an unsigned byte, and returns
it as integer. | public static int | ubytes2int(short x) | public static long | ubytes2long(int x) |
int2leb | public static void int2leb(int x, byte[] buf, int offset)(Code) | | Int to little-endian bytes: writes x to buf[offset..]
|
leb2int | public static int leb2int(byte[] x, int offset)(Code) | | Little-endian bytes to int
|
leb2short | public static short leb2short(byte[] x, int offset)(Code) | | Little-endian bytes to short
|
long2int | public static int long2int(long l)(Code) | | Returns the int value that is closest to l. That is, if l can fit into a
32-bit unsigned number, returns (int)l. Otherwise, returns either
Integer.MAX_VALUE or Integer.MIN_VALUE as appropriate.
|
reverse | public static byte[] reverse(byte[] x)(Code) | | Returns the reverse of x.
|
short2leb | public static void short2leb(short x, byte[] buf, int offset)(Code) | | Short to little-endian bytes: writes x to buf[offset...]
|
ubyte2int | public static int ubyte2int(byte x)(Code) | | Interprets the value of x as an unsigned byte, and returns
it as integer. For example, ubyte2int(0xFF)==255, not -1.
|
ubytes2int | public static int ubytes2int(short x)(Code) | | Interprets the value of x as am unsigned two-byte number
|
ubytes2long | public static long ubytes2long(int x)(Code) | | Interprets the value of x as an unsigned two-byte number
|
|
|