org.apache.wicket.util.io
Interface IObjectStreamFactory

All Known Implementing Classes:
IObjectStreamFactory.DefaultObjectStreamFactory, WicketObjectStreamFactory

public interface IObjectStreamFactory

Interface for serializing and deserializing so that we can vary the implementation of the ObjectOutputStream and ObjectInputStream implementations.

Author:
eelcohillenius
See Also:
Objects.objectToByteArray(Object), Objects.byteArrayToObject(byte[])

Nested Class Summary
static class IObjectStreamFactory.DefaultObjectStreamFactory
          Default implementation that uses the JDK's plain implementations.
 
Method Summary
 java.io.ObjectInputStream newObjectInputStream(java.io.InputStream in)
          Gets a new instance of an ObjectInputStream with the provided InputStream.
 java.io.ObjectOutputStream newObjectOutputStream(java.io.OutputStream out)
          Gets a new instance of an ObjectOutputStream with the provided OutputStream.
 

Method Detail

newObjectInputStream

java.io.ObjectInputStream newObjectInputStream(java.io.InputStream in)
                                               throws java.io.IOException
Gets a new instance of an ObjectInputStream with the provided InputStream.

Parameters:
in - The input stream that should be used for the reading
Returns:
a new object input stream instance
Throws:
java.io.IOException - if an I/O error occurs while reading stream header

newObjectOutputStream

java.io.ObjectOutputStream newObjectOutputStream(java.io.OutputStream out)
                                                 throws java.io.IOException
Gets a new instance of an ObjectOutputStream with the provided OutputStream.

Parameters:
out - The output stream that should be used for the writing
Returns:
a new object output stream instance
Throws:
java.io.IOException - if an I/O error occurs while writing stream header


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.