public class DefaultByteArraySerializer extends AbstractByteArraySerializer
Constructor and Description |
---|
DefaultByteArraySerializer() |
Modifier and Type | Method and Description |
---|---|
protected static <V> String |
baosWrite(V value) |
<V> String |
serialize(V object,
Charset charset)
将对象序列化为字符串
|
<V> String |
serialize(V object,
String charsetName)
将对象序列化为字符串
|
<V> byte[] |
serializeAsBytes(V object,
Charset charset)
将对象序列化为字节
|
<V> byte[] |
serializeAsBytes(V object,
String charsetName)
将对象序列化为字节
|
closeStream, serialize, serializeAsBytes
public <V> String serialize(V object, String charsetName) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象charsetName
- 字符集SerializerException
- 序列化异常public <V> String serialize(V object, Charset charset) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象charset
- 字符集SerializerException
- 序列化异常public <V> byte[] serializeAsBytes(V object, String charsetName) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象charsetName
- 字符集SerializerException
- 序列化异常public <V> byte[] serializeAsBytes(V object, Charset charset) throws SerializerException
Serializer
V
- 待序列化对象类型object
- 待序列化对象charset
- 字符集SerializerException
- 序列化异常protected static <V> String baosWrite(V value) throws IOException
IOException
Copyright © 2024 buession.com Inc.. All rights reserved.