Package com.liferay.portal.kernel.io
Class BigEndianCodec
Object
com.liferay.portal.kernel.io.BigEndianCodec
Encodes/decodes primitive types to/from big-endian byte sequences.
- Author:
- Shuyang Zhou
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBoolean
(byte[] bytes, int index) static char
getChar
(byte[] bytes, int index) static double
getDouble
(byte[] bytes, int index) static float
getFloat
(byte[] bytes, int index) static int
getInt
(byte[] bytes, int index) static long
getLong
(byte[] bytes, int index) static short
getShort
(byte[] bytes, int index) static void
putBoolean
(byte[] bytes, int index, boolean b) static void
putChar
(byte[] bytes, int index, char c) static void
putDouble
(byte[] bytes, int index, double d) static void
putFloat
(byte[] bytes, int index, float f) static void
putInt
(byte[] bytes, int index, int i) static void
putLong
(byte[] bytes, int index, long l) static void
putShort
(byte[] bytes, int index, short s)
-
Constructor Details
-
BigEndianCodec
public BigEndianCodec()
-
-
Method Details
-
getBoolean
public static boolean getBoolean(byte[] bytes, int index) -
getChar
public static char getChar(byte[] bytes, int index) -
getDouble
public static double getDouble(byte[] bytes, int index) -
getFloat
public static float getFloat(byte[] bytes, int index) -
getInt
public static int getInt(byte[] bytes, int index) -
getLong
public static long getLong(byte[] bytes, int index) -
getShort
public static short getShort(byte[] bytes, int index) -
putBoolean
public static void putBoolean(byte[] bytes, int index, boolean b) -
putChar
public static void putChar(byte[] bytes, int index, char c) -
putDouble
public static void putDouble(byte[] bytes, int index, double d) -
putFloat
public static void putFloat(byte[] bytes, int index, float f) -
putInt
public static void putInt(byte[] bytes, int index, int i) -
putLong
public static void putLong(byte[] bytes, int index, long l) -
putShort
public static void putShort(byte[] bytes, int index, short s)
-