public abstract class Pack extends Object
| Constructor and Description |
|---|
Pack() |
| Modifier and Type | Method and Description |
|---|---|
static int | bigEndianToInt(byte[] bs,
int off)Convert a big-endian byte array to an int. |
static void | bigEndianToInt(byte[] bs,
int off,
int[] ns)Convert a big-endian byte array to an array of ints. |
static void | bigEndianToInt(byte[] bs,
int off,
int[] ns,
int nsOff,
int nsLen)Convert a big-endian byte array to a range of an int array. |
static long | bigEndianToLong(byte[] bs,
int off)Convert a big-endian byte array to a long. |
static long | bigEndianToLong(byte[] bs,
int off,
int len)Convert a big-endian byte array of variable length to a long. |
static void | bigEndianToLong(byte[] bs,
int off,
long[] ns)Convert a big-endian byte array to a long array. |
static void | bigEndianToLong(byte[] bs,
int bsOff,
long[] ns,
int nsOff,
int nsLen)Convert a big-endian byte array to a range of a long array. |
static short | bigEndianToShort(byte[] bs,
int off)Convert a big-endian byte array to a short. |
static byte[] | intToBigEndian(int n)Convert an int to a big-endian byte array. |
static byte[] | intToBigEndian(int[] ns)Convert an int array to a big-endian byte array. |
static void | intToBigEndian(int[] ns,
byte[] bs,
int off)Write an int array to a byte array in big-endian order. |
static void | intToBigEndian(int[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)Write a range of an int array to a byte array in big-endian order. |
static void | intToBigEndian(int n,
byte[] bs,
int off)Write an int to a byte array in big-endian order. |
static byte[] | intToLittleEndian(int n)Convert an int to a little-endian byte array. |
static byte[] | intToLittleEndian(int[] ns)Convert an int array to a little-endian byte array. |
static void | intToLittleEndian(int[] ns,
byte[] bs,
int off)Write an int array to a byte array in little-endian order. |
static void | intToLittleEndian(int[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)Write a range of an int array to a byte array in little-endian order. |
static void | intToLittleEndian(int n,
byte[] bs,
int off)Write an int to a byte array in little-endian order. |
static int | littleEndianToInt_High(byte[] bs,
int off,
int len)Convert a little-endian byte array of variable length to the high-order bits of an int. |
static int | littleEndianToInt_Low(byte[] bs,
int off,
int len)Convert a little-endian byte array of variable length to an int (low-order bits). |
static int | littleEndianToInt(byte[] bs,
int off)Convert a little-endian byte array to an int. |
static int[] | littleEndianToInt(byte[] bs,
int off,
int count)Convert a little-endian byte array to a new int array of specified count. |
static void | littleEndianToInt(byte[] bs,
int off,
int[] ns)Convert a little-endian byte array to an int array. |
static void | littleEndianToInt(byte[] bs,
int bOff,
int[] ns,
int nOff,
int count)Convert a little-endian byte array to a range of an int array. |
static long | littleEndianToLong_High(byte[] bs,
int off,
int len)Convert a little-endian byte array of variable length to the high-order bits of a long. |
static long | littleEndianToLong_Low(byte[] bs,
int off,
int len)Convert a little-endian byte array of variable length to a long (low-order bits). |
static long | littleEndianToLong(byte[] bs,
int off)Convert a little-endian byte array to a long. |
static long | littleEndianToLong(byte[] input,
int off,
int len)Convert a little-endian byte array of variable length to a long. |
static void | littleEndianToLong(byte[] bs,
int off,
long[] ns)Convert a little-endian byte array to a long array. |
static void | littleEndianToLong(byte[] bs,
int bsOff,
long[] ns,
int nsOff,
int nsLen)Convert a little-endian byte array to a range of a long array. |
static short | littleEndianToShort(byte[] bs,
int off)Convert a little-endian byte array to a short. |
static byte[] | longToBigEndian(long n)Convert a long to a big-endian byte array. |
static byte[] | longToBigEndian(long[] ns)Convert a long array to a big-endian byte array. |
static void | longToBigEndian(long[] ns,
byte[] bs,
int off)Write a long array to a byte array in big-endian order. |
static void | longToBigEndian(long[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)Write a range of a long array to a byte array in big-endian order. |
static void | longToBigEndian(long n,
byte[] bs,
int off)Write a long to a byte array in big-endian order. |
static void | longToLittleEndian_High(long n,
byte[] bs,
int off,
int len)Write the high-order bytes of a long to a byte array in little-endian order. |
static byte[] | longToLittleEndian(long n)Convert a long to a little-endian byte array. |
static byte[] | longToLittleEndian(long[] ns)Convert a long array to a little-endian byte array. |
static void | longToLittleEndian(long[] ns,
byte[] bs,
int off)Write a long array to a byte array in little-endian order. |
static void | longToLittleEndian(long[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)Write a range of a long array to a byte array in little-endian order. |
static void | longToLittleEndian(long n,
byte[] bs,
int off)Write a long to a byte array in little-endian order. |
static void | longToLittleEndian(long n,
byte[] bs,
int off,
int len)Write a long to a byte array in little-endian order with variable length. |
static byte[] | shortToBigEndian(short n)Convert a short to a big-endian byte array. |
static void | shortToBigEndian(short n,
byte[] bs,
int off)Write a short to a byte array in big-endian order. |
static byte[] | shortToLittleEndian(short n)Convert a short to a little-endian byte array. |
static void | shortToLittleEndian(short n,
byte[] bs,
int off)Write a short to a byte array in little-endian order. |
public static int bigEndianToInt(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static void bigEndianToInt(byte[] bs,
int off,
int[] ns)bs - the byte arrayoff - the offset into the arrayns - the output int arraypublic static void bigEndianToInt(byte[] bs,
int off,
int[] ns,
int nsOff,
int nsLen)bs - the byte arrayoff - the offset into the arrayns - the output int arraynsOff - the offset into the output arraynsLen - the number of ints to writepublic static long bigEndianToLong(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static long bigEndianToLong(byte[] bs,
int off,
int len)bs - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-8)public static void bigEndianToLong(byte[] bs,
int off,
long[] ns)bs - the byte arrayoff - the offset into the arrayns - the output long arraypublic static void bigEndianToLong(byte[] bs,
int bsOff,
long[] ns,
int nsOff,
int nsLen)bs - the byte arraybsOff - the offset into the byte arrayns - the output long arraynsOff - the offset into the output arraynsLen - the number of longs to writepublic static short bigEndianToShort(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static byte[] intToBigEndian(int n)
n - the int valuepublic static byte[] intToBigEndian(int[] ns)
ns - the int arraypublic static void intToBigEndian(int[] ns,
byte[] bs,
int off)ns - the int arraybs - the target byte arrayoff - the offset into the arraypublic static void intToBigEndian(int[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)ns - the int arraynsOff - the offset into the int arraynsLen - the number of ints to writebs - the target byte arraybsOff - the offset into the byte arraypublic static void intToBigEndian(int n,
byte[] bs,
int off)n - the int valuebs - the target byte arrayoff - the offset into the arraypublic static byte[] intToLittleEndian(int n)
n - the int valuepublic static byte[] intToLittleEndian(int[] ns)
ns - the int arraypublic static void intToLittleEndian(int[] ns,
byte[] bs,
int off)ns - the int arraybs - the target byte arrayoff - the offset into the arraypublic static void intToLittleEndian(int[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)ns - the int arraynsOff - the offset into the int arraynsLen - the number of ints to writebs - the target byte arraybsOff - the offset into the byte arraypublic static void intToLittleEndian(int n,
byte[] bs,
int off)n - the int valuebs - the target byte arrayoff - the offset into the arraypublic static int littleEndianToInt_High(byte[] bs,
int off,
int len)bs - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-4)public static int littleEndianToInt_Low(byte[] bs,
int off,
int len)bs - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-4)public static int littleEndianToInt(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static int[] littleEndianToInt(byte[] bs,
int off,
int count)bs - the byte arrayoff - the offset into the arraycount - the number of ints to readpublic static void littleEndianToInt(byte[] bs,
int off,
int[] ns)bs - the byte arrayoff - the offset into the arrayns - the output int arraypublic static void littleEndianToInt(byte[] bs,
int bOff,
int[] ns,
int nOff,
int count)bs - the byte arraybOff - the offset into the byte arrayns - the output int arraynOff - the offset into the output arraycount - the number of ints to writepublic static long littleEndianToLong_High(byte[] bs,
int off,
int len)bs - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-8)public static long littleEndianToLong_Low(byte[] bs,
int off,
int len)bs - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-8)public static long littleEndianToLong(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static long littleEndianToLong(byte[] input,
int off,
int len)input - the byte arrayoff - the offset into the arraylen - the number of bytes to read (1-8)public static void littleEndianToLong(byte[] bs,
int off,
long[] ns)bs - the byte arrayoff - the offset into the arrayns - the output long arraypublic static void littleEndianToLong(byte[] bs,
int bsOff,
long[] ns,
int nsOff,
int nsLen)bs - the byte arraybsOff - the offset into the byte arrayns - the output long arraynsOff - the offset into the output arraynsLen - the number of longs to writepublic static short littleEndianToShort(byte[] bs,
int off)bs - the byte arrayoff - the offset into the arraypublic static byte[] longToBigEndian(long n)
n - the long valuepublic static byte[] longToBigEndian(long[] ns)
ns - the long arraypublic static void longToBigEndian(long[] ns,
byte[] bs,
int off)ns - the long arraybs - the target byte arrayoff - the offset into the arraypublic static void longToBigEndian(long[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)ns - the long arraynsOff - the offset into the long arraynsLen - the number of longs to writebs - the target byte arraybsOff - the offset into the byte arraypublic static void longToBigEndian(long n,
byte[] bs,
int off)n - the long valuebs - the target byte arrayoff - the offset into the arraypublic static void longToLittleEndian_High(long n,
byte[] bs,
int off,
int len)n - the long valuebs - the target byte arrayoff - the offset into the arraylen - the number of bytes to write (1-8)public static byte[] longToLittleEndian(long n)
n - the long valuepublic static byte[] longToLittleEndian(long[] ns)
ns - the long arraypublic static void longToLittleEndian(long[] ns,
byte[] bs,
int off)ns - the long arraybs - the target byte arrayoff - the offset into the arraypublic static void longToLittleEndian(long[] ns,
int nsOff,
int nsLen,
byte[] bs,
int bsOff)ns - the long arraynsOff - the offset into the long arraynsLen - the number of longs to writebs - the target byte arraybsOff - the offset into the byte arraypublic static void longToLittleEndian(long n,
byte[] bs,
int off)n - the long valuebs - the target byte arrayoff - the offset into the arraypublic static void longToLittleEndian(long n,
byte[] bs,
int off,
int len)n - the long valuebs - the target byte arrayoff - the offset into the arraylen - the number of bytes to write (1-8)public static byte[] shortToBigEndian(short n)
n - the short valuepublic static void shortToBigEndian(short n,
byte[] bs,
int off)n - the short valuebs - the target byte arrayoff - the offset into the arraypublic static byte[] shortToLittleEndian(short n)
n - the short valuepublic static void shortToLittleEndian(short n,
byte[] bs,
int off)n - the short valuebs - the target byte arrayoff - the offset into the array