public final class Serializer extends Object
Serializable
.Serializable
限定符和类型 | 方法和说明 |
---|---|
static Object |
deserialize(byte[] data)
Uses default de-serialization to turn a byte array into an object.
|
static byte[] |
serialize(Serializable obj)
Serializes an object using default serialization.
|
public static byte[] serialize(Serializable obj) throws IOException
obj
- an object need to serializeIOException
- io exceptionpublic static Object deserialize(byte[] data) throws IOException, ClassNotFoundException
data
- the byte array need to be convertedIOException
- io exceptionClassNotFoundException
- class not found exceptionCopyright © 2014 EPIC Team. All rights reserved.