Class BmStringSerializer
java.lang.Object
com._1c.g5.v8.bm.common.serialization.BmStringSerializer
String serialization utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
deserialize
(byte[] data) Deserializes a string value from a serialized representation created withserialize(String)
.static String
deserialize
(byte[] data, int offset, int length) Deserializes a string value from a serialized representation created withserialize(String)
.static String
deserialize
(DataInput in) Deserializes a string value from a serialized representation created withserialize(DataOutput, String)
method.static String
Deserializes a string value from a serialized representation created withserialize2(String, DataOutput)
method.static String
deserialize2
(ByteBuffer data) Deserializes a string value from a serialized representation created withserialize2(String)
.static String
Deserializes a string value from a serialized representation created withserialize3(String, DataOutput)
method.static void
serialize
(DataOutput out, String value) Serializes the specified string value.static byte[]
Serializes the specified string value.static byte[]
serialize2
(String value) Serializes the specified string value.static void
serialize2
(String value, DataOutput out) Serializes the specified string value.static void
serialize3
(String value, DataOutput out) Serializes the specified string value.
-
Method Details
-
serialize
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
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
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
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
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
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
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
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
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
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
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
-