public interface Serializer
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(byte[] bytes)
反序列化到对象
|
String |
name()
序列化器的名称,该方法仅用于打印日志的时候显示
|
byte[] |
serialize(Object obj)
对象序列化到字节数组
|
String name()
byte[] serialize(Object obj) throws IOException
obj
- 待序列化的对象IOException
- io exceptionObject deserialize(byte[] bytes) throws IOException
bytes
- 反序列化的数据IOException
- io exceptionCopyright © 2018. All rights reserved.