com.sun.enterprise.container.common.spi.util
Class JavaEEObjectStreamFactory

java.lang.Object
  extended by com.sun.enterprise.container.common.spi.util.JavaEEObjectStreamFactory

@Service
public class JavaEEObjectStreamFactory
extends Object

A Factory class for creating EJBObject input/output Stream

Author:
Mahesh Kannan

Field Summary
static Logger _logger
           
 
Constructor Summary
JavaEEObjectStreamFactory()
           
 
Method Summary
 ObjectInputStream createObjectInputStream(InputStream is, boolean resolveObject, ClassLoader loader)
          Obtain an ObjectInputStream that allows de-serialization of a graph of objects.
 ObjectOutputStream createObjectOutputStream(OutputStream os, boolean replaceObject)
          Obtain an ObjectOutputStream that allows serialization of a graph of objects.
 Object deserializeObject(byte[] data, boolean resolveObject, ClassLoader classLoader)
           
 byte[] serializeObject(Object obj, boolean replaceObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

public static final Logger _logger
Constructor Detail

JavaEEObjectStreamFactory

public JavaEEObjectStreamFactory()
Method Detail

createObjectOutputStream

public ObjectOutputStream createObjectOutputStream(OutputStream os,
                                                   boolean replaceObject)
                                            throws IOException
Obtain an ObjectOutputStream that allows serialization of a graph of objects. The objects can be plain Serializable objects or can be converted into Serializable objects using the handler

Returns:
an ObjectOutputStream that can be used to serialize objects
Throws:
IOException - when the serialziation fails

createObjectInputStream

public ObjectInputStream createObjectInputStream(InputStream is,
                                                 boolean resolveObject,
                                                 ClassLoader loader)
                                          throws Exception
Obtain an ObjectInputStream that allows de-serialization of a graph of objects.

Returns:
an ObjectInputStream that can be used to deserialize objects
Throws:
IOException - when the de-serialziation fails
Exception

serializeObject

public final byte[] serializeObject(Object obj,
                                    boolean replaceObject)
                             throws IOException
Throws:
IOException

deserializeObject

public final Object deserializeObject(byte[] data,
                                      boolean resolveObject,
                                      ClassLoader classLoader)
                               throws Exception
Throws:
Exception


Copyright © 2012 GlassFish Community. All Rights Reserved.