public interface ObjectSerialization<T>
| 限定符和类型 | 方法和说明 |
|---|---|
default <T> T |
deserialize(byte[] bytes,
Class<T> clz)
Deserialize an object from the given binary data.
|
<T> T |
deserialize(InputStream input,
Class<T> clz)
Deserialize an object from the given input stream.
|
byte |
getType()
Serialization type.
|
void |
serialize(OutputStream output,
T obj)
Serialize the given object to stream data.
|
default byte[] |
serialize(T obj)
Serialize the given object to binary data.
|
default byte[] serialize(T obj)
obj - object to serializevoid serialize(OutputStream output, T obj)
obj - object to serializeoutput - output stream to writedefault <T> T deserialize(byte[] bytes,
Class<T> clz)
T - Object class typebytes - object binary representationclz - specified class type<T> T deserialize(InputStream input, Class<T> clz)
T - Object class typeinput - object input stream representationclz - specified class typebyte getType()
Copyright © 2018–2020. All rights reserved.