public abstract class SerializationUtils extends Object
Constructor and Description |
---|
SerializationUtils() |
Modifier and Type | Method and Description |
---|---|
static Object |
deserialize(byte[] aBytes)
Deserializes an object from a byte array.
|
static byte[] |
serialize(Serializable aObject)
Serializes an object to a byte array.
|
public static byte[] serialize(Serializable aObject) throws IOException
aObject
- object to serializeaObject
encoded as a byte array. If aObject
is
null
, null
is returned.IOException
- if an I/O error occurspublic static Object deserialize(byte[] aBytes) throws IOException, ClassNotFoundException
aBytes
- byte array to read fromObject
deserialized from aBytes
. If
aBytes
is null
, null
is returned.IOException
- if an I/O error occursClassNotFoundException
- if a required class could not be foundCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.