com.sun.ejb.spi.io
Interface J2EEObjectStreamFactory

All Known Implementing Classes:
J2EEObjectStreamFactoryImpl

@Contract
public interface J2EEObjectStreamFactory

A Factory interface for creating an Object{Input | Output}Stream that allows serialization / de-serialization of "standard" J2EE Objects like EJBLocalObject, JNDIContext, UserTransaction etc.

Author:
Mahesh Kannan

Method Summary
 ObjectInputStream createObjectInputStream(InputStream is, boolean resolveObject, ClassLoader appClassLoader)
          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.
 

Method Detail

createObjectOutputStream

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

ObjectInputStream createObjectInputStream(InputStream is,
                                          boolean resolveObject,
                                          ClassLoader appClassLoader)
                                          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


Copyright © 2012 GlassFish Community. All Rights Reserved.