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 booleangetBoolean(byte[] bytes, int index) static chargetChar(byte[] bytes, int index) static doublegetDouble(byte[] bytes, int index) static floatgetFloat(byte[] bytes, int index) static intgetInt(byte[] bytes, int index) static longgetLong(byte[] bytes, int index) static shortgetShort(byte[] bytes, int index) static voidputBoolean(byte[] bytes, int index, boolean b) static voidputChar(byte[] bytes, int index, char c) static voidputDouble(byte[] bytes, int index, double d) static voidputFloat(byte[] bytes, int index, float f) static voidputInt(byte[] bytes, int index, int i) static voidputLong(byte[] bytes, int index, long l) static voidputShort(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)
-