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
 ObjectInputStream newObjectInputStream(InputStream in)
          Gets a new instance of an ObjectInputStream with the provided InputStream.
 ObjectOutputStream newObjectOutputStream(OutputStream out)
          Gets a new instance of an ObjectOutputStream with the provided OutputStream.
 

Method Detail

newObjectInputStream

ObjectInputStream newObjectInputStream(InputStream in)
                                       throws 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:
IOException - if an I/O error occurs while reading stream header

newObjectOutputStream

ObjectOutputStream newObjectOutputStream(OutputStream out)
                                         throws 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:
IOException - if an I/O error occurs while writing stream header


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