public class Serialize
extends java.lang.Object
Constructor and Description |
---|
Serialize() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
deserialize(byte[] ba)
Given a byte array, reconstruct the object
|
static void |
init()
This method is used internally to preload the
serialization classes for performance.
|
static byte[] |
serialize(java.lang.Object obj)
Serialize an object into a byte array
|
public static byte[] serialize(java.lang.Object obj) throws java.io.IOException
obj
- The object to be serializedjava.io.IOException
- Lower-level exception is "bubbled up"public static java.lang.Object deserialize(byte[] ba) throws java.io.StreamCorruptedException, java.io.IOException, java.io.OptionalDataException, java.lang.ClassNotFoundException
ba
- The byte arrayjava.io.StreamCorruptedException
- Lower-level exception is "bubbled up"java.io.IOException
- Lower-level exception is "bubbled up"java.io.OptionalDataException
- Lower-level exception is "bubbled up"java.lang.ClassNotFoundException
- Lower-level exception is "bubbled up"public static void init()