com.sun.sgs.impl.service.data
Class SerialUtil

java.lang.Object
  extended by com.sun.sgs.impl.service.data.SerialUtil

final class SerialUtil
extends Object

Defines serialization utilities. This class cannot be instantiated.


Method Summary
(package private) static void check(Object object, ObjectIOException cause)
          Checks an object for direct references to managed objects, throwing an exception that contains debugging information about where the bad reference was found.
(package private) static Object deserialize(byte[] data, ClassSerialization classSerial)
          Converts serialized data into an object.
(package private) static byte[] serialize(ManagedObject object, ClassSerialization classSerial)
          Converts an managed object into serialized data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

deserialize

static Object deserialize(byte[] data,
                          ClassSerialization classSerial)
Converts serialized data into an object.

Parameters:
data - the serialized data
classSerial - controls reading of class descriptors
Returns:
the object
Throws:
ObjectIOException - if a problem occurs deserializing the object

serialize

static byte[] serialize(ManagedObject object,
                        ClassSerialization classSerial)
Converts an managed object into serialized data.

Parameters:
object - the object
classSerial - controls writing of class descriptors
Returns:
the serialized data
Throws:
ObjectIOException - if a problem occurs serializing the object and, in particular, if a ManagedObject is referenced without an intervening ManagedReference

check

static void check(Object object,
                  ObjectIOException cause)
Checks an object for direct references to managed objects, throwing an exception that contains debugging information about where the bad reference was found.

Parameters:
object - the object to check
cause - the exception that prompted the check, or null
Throws:
ObjectIOException - if a direct reference to a managed object is found

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved