Package org.gridgain.internal.dr.binary
Class BinaryPrimitives
java.lang.Object
org.gridgain.internal.dr.binary.BinaryPrimitives
Helper class provides method for reading primitive types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectreadBoolean(byte[] arr, int off) Readsbooleanvalue.static bytereadByte(byte[] arr, int off) Readsbytevalue.static byte[]readByteArray(byte[] arr, int off, int len) Readsbyte arrayvalue.static ObjectreadChar(byte[] arr, int off) Readscharvalue.static ObjectreadDouble(byte[] arr, int off) Readsdoublevalue.static ObjectreadFloat(byte[] arr, int off) Readsfloatvalue.static intreadInt(byte[] arr, int off) Readsintvalue.static longreadLong(byte[] arr, int off) Readslongvalue.static shortreadShort(byte[] arr, int off) Readsshortvalue.
-
Method Details
-
readBoolean
Readsbooleanvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readByte
public static byte readByte(byte[] arr, int off) Readsbytevalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readShort
public static short readShort(byte[] arr, int off) Readsshortvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readInt
public static int readInt(byte[] arr, int off) Readsintvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readLong
public static long readLong(byte[] arr, int off) Readslongvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readFloat
Readsfloatvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readDouble
Readsdoublevalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readChar
Readscharvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-
readByteArray
public static byte[] readByteArray(byte[] arr, int off, int len) Readsbyte arrayvalue.- Parameters:
arr- Array to read from.off- Offset in array.
-