Class BmStringSerializer
- java.lang.Object
-
- com._1c.g5.v8.bm.common.serialization.BmStringSerializer
-
public final class BmStringSerializer extends Object
String serialization utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdeserialize(byte[] data)Deserializes a string value from a serialized representation created withserialize(String).static Stringdeserialize(byte[] data, int offset, int length)Deserializes a string value from a serialized representation created withserialize(String).static Stringdeserialize(DataInput in)Deserializes a string value from a serialized representation created withserialize(DataOutput, String)method.static Stringdeserialize2(DataInput in)Deserializes a string value from a serialized representation created withserialize2(String, DataOutput)method.static Stringdeserialize2(ByteBuffer data)Deserializes a string value from a serialized representation created withserialize2(String).static Stringdeserialize3(DataInput in)Deserializes a string value from a serialized representation created withserialize3(String, DataOutput)method.static voidserialize(DataOutput out, String value)Serializes the specified string value.static byte[]serialize(String value)Serializes the specified string value.static byte[]serialize2(String value)Serializes the specified string value.static voidserialize2(String value, DataOutput out)Serializes the specified string value.static voidserialize3(String value, DataOutput out)Serializes the specified string value.
-
-
-
Method Detail
-
serialize
public static void serialize(DataOutput out, String value) throws IOException
Serializes the specified string value. Compresses strings longer than 32768 characters.- Parameters:
out- The data output to write the serialized representation to. May not benull.value- the string value to serialize. May benull.- Throws:
IOException
-
deserialize
public static String deserialize(DataInput in) throws IOException
Deserializes a string value from a serialized representation created withserialize(DataOutput, String)method.- Parameters:
in- The data input to read the serialized representation from. May not benull.- Returns:
- the deserialized value. May be
null. - Throws:
IOException
-
serialize
public static byte[] serialize(String value) throws IOException
Serializes the specified string value. Compresses strings longer than 32768 characters.- Parameters:
value- the string value to serialize. May benull.- Returns:
- a byte array containing the serialized representation. May not be
null. - Throws:
IOException
-
deserialize
public static String deserialize(byte[] data) throws IOException
Deserializes a string value from a serialized representation created withserialize(String).- Parameters:
data- A byte array containing the serialized data. May not benull.- Returns:
- the deserialized value. May be
null. - Throws:
IOException
-
deserialize
public static String deserialize(byte[] data, int offset, int length) throws IOException
Deserializes a string value from a serialized representation created withserialize(String).- Parameters:
data- A byte array containing the serialized data. May not benull.offset- The offset of the serialized data within the array.length- The length of the serialied data.- Returns:
- the deserialized value. May be
null. - Throws:
IOException
-
serialize2
public static byte[] serialize2(String value)
Serializes the specified string value.- Parameters:
value- the string value to serialize. May benull.- Returns:
- a byte array containing the serialized representation. Never
null.
-
deserialize2
public static String deserialize2(ByteBuffer data)
Deserializes a string value from a serialized representation created withserialize2(String).- Parameters:
data- The byte buffer containing serialized data. May not benull.- Returns:
- the deserialized value. May be
null.
-
serialize2
public static void serialize2(String value, DataOutput out) throws IOException
Serializes the specified string value.- Parameters:
value- the string value to serialize. May benull.out- The data output to write the serialized representation to. May not benull.- Throws:
IOException
-
deserialize2
public static String deserialize2(DataInput in) throws IOException
Deserializes a string value from a serialized representation created withserialize2(String, DataOutput)method.- Parameters:
in- The data input to read the serialized representation from. May not benull.- Returns:
- the deserialized value. May be
null. - Throws:
IOException
-
serialize3
public static void serialize3(String value, DataOutput out) throws IOException
Serializes the specified string value.- Parameters:
value- the string value to serialize. May not benull.out- The data output to write the serialized representation to. May not benull.- Throws:
IOException
-
deserialize3
public static String deserialize3(DataInput in) throws IOException
Deserializes a string value from a serialized representation created withserialize3(String, DataOutput)method.- Parameters:
in- The data input to read the serialized representation from. May not benull.- Returns:
- the deserialized value. May not be
null. - Throws:
IOException
-
-