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 java.lang.Object

A Factory class for creating EJBObject input/output Stream

Author:
Mahesh Kannan

Field Summary
static java.util.logging.Logger _logger
           
 
Constructor Summary
JavaEEObjectStreamFactory()
           
 
Method Summary
 java.io.ObjectInputStream createObjectInputStream(java.io.InputStream is, boolean resolveObject, java.lang.ClassLoader loader)
          Obtain an ObjectInputStream that allows de-serialization of a graph of objects.
 java.io.ObjectOutputStream createObjectOutputStream(java.io.OutputStream os, boolean replaceObject)
          Obtain an ObjectOutputStream that allows serialization of a graph of objects.
 java.lang.Object deserializeObject(byte[] data, boolean resolveObject, java.lang.ClassLoader classLoader)
           
 byte[] serializeObject(java.lang.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 java.util.logging.Logger _logger
Constructor Detail

JavaEEObjectStreamFactory

public JavaEEObjectStreamFactory()
Method Detail

createObjectOutputStream

public java.io.ObjectOutputStream createObjectOutputStream(java.io.OutputStream os,
                                                           boolean replaceObject)
                                                    throws java.io.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:
java.io.IOException - when the serialziation fails

createObjectInputStream

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

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

serializeObject

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

deserializeObject

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


Copyright © 2012 GlassFish Community. All Rights Reserved.