Package arc.util
Class Pack
java.lang.Object
arc.util.Pack
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte
byteByte
(byte left, byte right) Packs two bytes with values 0-15 into one byte.static byte[]
bytes
(int i, byte[] result) The same array instance is returned each call.static byte
byteValue
(boolean b) static int
intBytes
(byte[] array) Packs 4 bytes into an int.static int
intBytes
(byte b1, byte b2, byte b3, byte b4) static byte
leftByte
(byte value) static byte
leftByte
(short field) static int
leftInt
(long field) static short
leftShort
(int field) static long
longInt
(int x, int y) static long
longShorts
(short[] s) static byte
rightByte
(byte value) static byte
rightByte
(short field) static int
rightInt
(long field) static short
rightShort
(int field) static short
shortByte
(byte left, byte right) static int
shortInt
(short left, short right) static short[]
shorts
(long i, short[] resultShort) The same array instance is returned each call.static int
u
(byte b) byte -> unsigned bytestatic long
u
(int b) int -> unsigned intstatic int
u
(short b) short -> unsigned short
-
Constructor Details
-
Pack
public Pack()
-
-
Method Details
-
u
public static int u(byte b) byte -> unsigned byte -
u
public static int u(short b) short -> unsigned short -
u
public static long u(int b) int -> unsigned int -
byteValue
public static byte byteValue(boolean b) -
shortInt
public static int shortInt(short left, short right) -
longInt
public static long longInt(int x, int y) -
byteByte
public static byte byteByte(byte left, byte right) Packs two bytes with values 0-15 into one byte. -
leftByte
public static byte leftByte(byte value) -
rightByte
public static byte rightByte(byte value) -
leftShort
public static short leftShort(int field) -
rightShort
public static short rightShort(int field) -
leftInt
public static int leftInt(long field) -
rightInt
public static int rightInt(long field) -
leftByte
public static byte leftByte(short field) -
rightByte
public static byte rightByte(short field) -
shortByte
public static short shortByte(byte left, byte right) -
bytes
public static byte[] bytes(int i, byte[] result) The same array instance is returned each call. -
shorts
public static short[] shorts(long i, short[] resultShort) The same array instance is returned each call. -
longShorts
public static long longShorts(short[] s) -
intBytes
public static int intBytes(byte b1, byte b2, byte b3, byte b4) -
intBytes
public static int intBytes(byte[] array) Packs 4 bytes into an int.
-