public class SerializationUtil extends Object
| 构造器和说明 |
|---|
SerializationUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
deserialize(byte[] bytes,
Class<T> t)
反序列化对象
|
static <T extends Serializable> |
serialize(T obj)
序列化对象 对象应实现Serializable接口
|
public static <T extends Serializable> byte[] serialize(T obj)
T - 对象类型obj - 要序列化的对象public static <T> T deserialize(byte[] bytes,
Class<T> t)
T - 对象的类型bytes - byte数组t - 要反序列化的对象Copyright © 2017. All Rights Reserved.