yawn.io.serialization
Interface ISerializer

All Known Implementing Classes:
BetwixtXmlSerializer, CastorXmlSerializer

public interface ISerializer

Abstract class for serializing objects. $Id: ISerializer.java,v 1.3 2005/04/07 17:28:07 supermarti Exp $

Version:
$Revision: 1.3 $
Author:
Alexei Guevara

Method Summary
 java.lang.Object deSerialize(java.lang.Class root, java.io.InputStreamReader reader)
          Reads an object of class root from a source
 void serialize(java.lang.Object object, java.io.OutputStreamWriter writer)
          Serializes an object.
 

Method Detail

serialize

void serialize(java.lang.Object object,
               java.io.OutputStreamWriter writer)
               throws SerializationException
Serializes an object.

Parameters:
object - The object to serialize.
writer - The destination where the serialized object will br writen to.
Throws:
java.io.IOException
SerializationException

deSerialize

java.lang.Object deSerialize(java.lang.Class root,
                             java.io.InputStreamReader reader)
                             throws SerializationException
Reads an object of class root from a source

Parameters:
root - the object class to read
reader - the source to read from
Returns:
the inflated object
Throws:
SerializationException
java.io.IOException


Copyright © 2003-2005 GIAA, Universidad Carlos III de Madrid. All Rights Reserved.