Class BinaryPrimitives

java.lang.Object
org.gridgain.internal.dr.binary.BinaryPrimitives

public final class BinaryPrimitives extends Object
Helper class provides method for reading primitive types.
  • Method Details

    • readBoolean

      public static Object readBoolean(byte[] arr, int off)
      Reads boolean value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readByte

      public static byte readByte(byte[] arr, int off)
      Reads byte value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readShort

      public static short readShort(byte[] arr, int off)
      Reads short value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readInt

      public static int readInt(byte[] arr, int off)
      Reads int value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readLong

      public static long readLong(byte[] arr, int off)
      Reads long value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readFloat

      public static Object readFloat(byte[] arr, int off)
      Reads float value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readDouble

      public static Object readDouble(byte[] arr, int off)
      Reads double value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readChar

      public static Object readChar(byte[] arr, int off)
      Reads char value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.
    • readByteArray

      public static byte[] readByteArray(byte[] arr, int off, int len)
      Reads byte array value.
      Parameters:
      arr - Array to read from.
      off - Offset in array.