java.lang.Object
com.orientechnologies.orient.core.serialization.serializer.record.binary.OVarIntSerializer

public class OVarIntSerializer extends Object
  • Constructor Details

    • OVarIntSerializer

      public OVarIntSerializer()
  • Method Details

    • write

      public static void write(DataOutput output, long value) throws IOException
      Throws:
      IOException
    • write

      public static int write(BytesContainer bytes, long value)
    • readAsInt

      public static int readAsInt(DataInput input) throws IOException
      Throws:
      IOException
    • readAsLong

      public static long readAsLong(DataInput input) throws IOException
      Throws:
      IOException
    • readAsShort

      public static short readAsShort(BytesContainer bytes)
    • readAsLong

      public static long readAsLong(BytesContainer bytes)
    • readAsInteger

      public static int readAsInteger(BytesContainer bytes)
    • readAsByte

      public static byte readAsByte(BytesContainer bytes)
    • writeUnsignedVarLong

      public static void writeUnsignedVarLong(long value, BytesContainer bos)
      Encodes a value using the variable-length encoding from Google Protocol Buffers. Zig-zag is not used, so input must not be negative.
      Parameters:
      value - value to encode
    • writeUnsignedVarLong

      public static void writeUnsignedVarLong(long value, DataOutput bos) throws IOException
      Encodes a value using the variable-length encoding from Google Protocol Buffers. Zig-zag is not used, so input must not be negative.
      Parameters:
      value - value to encode
      Throws:
      IOException
    • readSignedVarLong

      public static long readSignedVarLong(BytesContainer bytes)
      Parameters:
      bytes - to read bytes from
      Returns:
      decode value
      Throws:
      IllegalArgumentException - if variable-length value does not terminate after 9 bytes have been read
    • readSignedVarLong

      public static long readSignedVarLong(DataInput bytes) throws IOException
      Parameters:
      bytes - to read bytes from
      Returns:
      decode value
      Throws:
      IllegalArgumentException - if variable-length value does not terminate after 9 bytes have been read
      IOException
    • readUnsignedVarLong

      public static long readUnsignedVarLong(BytesContainer bytes)
      Parameters:
      bytes - to read bytes from
      Returns:
      decode value
      Throws:
      IllegalArgumentException - if variable-length value does not terminate after 9 bytes have been read
    • readUnsignedVarLong

      public static long readUnsignedVarLong(DataInput bytes) throws IOException
      Parameters:
      bytes - to read bytes from
      Returns:
      decode value
      Throws:
      IllegalArgumentException - if variable-length value does not terminate after 9 bytes have been read
      IOException