Class SerializationUtil
- java.lang.Object
-
- com._1c.g5.v8.bm.common.serialization.SerializationUtil
-
public final class SerializationUtil extends Object
Serialization utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
packInt(int value, DataOutput out)
Pack non-negative long into output stream.static void
packLong(long value, DataOutput out)
Pack non-negative long into output stream.static int
unpackInt(DataInput in)
Unpack positive int value from the input stream.static long
unpackLong(DataInput in)
Unpack positive long value from the input stream.
-
-
-
Method Detail
-
packInt
public static void packInt(int value, DataOutput out) throws IOException
Pack non-negative long into output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space)This method has been borrowed from MapDB but originally comes from Kryo Framework, author Nathan Sweet. It was modified to fit MapDB needs.
- Parameters:
value
- to be serialized, must be non-negativeout
- DataOutput to put value into- Throws:
IOException
-
unpackInt
public static int unpackInt(DataInput in) throws IOException
Unpack positive int value from the input stream.This method has been borrowed from MapDB but originally comes from Kryo Framework, author Nathan Sweet. It was modified to fit MapDB needs.
- Parameters:
in
- The input stream.- Returns:
- The long value.
- Throws:
IOException
-
packLong
public static void packLong(long value, DataOutput out) throws IOException
Pack non-negative long into output stream. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)This method has been borrowed from MapDB but originally comes from Kryo Framework, author Nathan Sweet. It was modified to fit MapDB needs.
- Parameters:
value
- to be serialized, must be non-negativeout
- DataOutput to put value into- Throws:
IOException
-
unpackLong
public static long unpackLong(DataInput in) throws IOException
Unpack positive long value from the input stream.This method has been borrowed from MapDB but originally comes from Kryo Framework, author Nathan Sweet. It was modified to fit MapDB needs.
- Parameters:
in
- The input stream.- Returns:
- The long value.
- Throws:
IOException
-
-