Package bitronix.tm.utils
Class Encoder
java.lang.Object
bitronix.tm.utils.Encoder
Number to byte array and byte array to number encoder.
- Author:
- lorban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intbytesToInt(byte[] bytes, int pos) static longbytesToLong(byte[] bytes, int pos) static byte[]intToBytes(int anInt) static byte[]longToBytes(long aLong) static byte[]shortToBytes(short aShort)
-
Constructor Details
-
Encoder
public Encoder()
-
-
Method Details
-
longToBytes
public static byte[] longToBytes(long aLong) -
intToBytes
public static byte[] intToBytes(int anInt) -
shortToBytes
public static byte[] shortToBytes(short aShort) -
bytesToLong
public static long bytesToLong(byte[] bytes, int pos) -
bytesToInt
public static int bytesToInt(byte[] bytes, int pos)
-