|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.util.Serializer
Utility methods to serialize/de-serialize an object to/from a byte array
Constructor Summary | |
Serializer()
Creates new Serializer |
Method Summary | |
static java.lang.Object |
bytesToObject(byte[] bArray)
de-serialize an object from a byte array |
static void |
main(java.lang.String[] argv)
for testing purpose only |
static byte[] |
objectToBytes(java.lang.Object obj)
Serialize an object to a byte array |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Serializer()
Method Detail |
public static java.lang.Object bytesToObject(byte[] bArray) throws java.lang.ClassNotFoundException, java.io.OptionalDataException, java.io.IOException
bArray
- byte array representation of the object
java.lang.ClassNotFoundException
- Class of a serialized object cannot be found
java.io.OptionalDataException
- Primitive data was found in the
stream instead of objects.
java.io.IOException
- failed or interrupted io operationpublic static void main(java.lang.String[] argv)
argv
- comman line arguments. This main does not take any.public static byte[] objectToBytes(java.lang.Object obj)
obj
- object to be serialized
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.