org.openi.xml
Class BeanStorage

java.lang.Object
  extended byorg.openi.xml.BeanStorage

public class BeanStorage
extends java.lang.Object

Version:
$Revision: 1.1.1.2 $ $Date: 2005/07/11 17:58:37 $ Utility methods for bean persistence.
Author:
plucas

Constructor Summary
BeanStorage()
           
 
Method Summary
 void deleteFile(java.lang.String filename)
           
 java.lang.Object restoreBeanFromFile(java.lang.String filename)
           
 java.lang.Object restoreBeanFromFile(java.lang.String filename, java.lang.Object root)
          Populating the fields of the given object instead of instantiating a new one.
 void saveBean(java.io.Writer writer, java.lang.Object bean)
           
 void saveBeanToFile(java.lang.String filename, java.lang.Object bean)
           
 java.lang.String toXmlString(java.lang.Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanStorage

public BeanStorage()
Method Detail

toXmlString

public java.lang.String toXmlString(java.lang.Object bean)

saveBeanToFile

public void saveBeanToFile(java.lang.String filename,
                           java.lang.Object bean)
                    throws java.io.IOException
Throws:
java.io.IOException

saveBean

public void saveBean(java.io.Writer writer,
                     java.lang.Object bean)
              throws java.io.IOException
Throws:
java.io.IOException

restoreBeanFromFile

public java.lang.Object restoreBeanFromFile(java.lang.String filename)
                                     throws java.io.IOException
Parameters:
filename -
Returns:
Throws:
java.io.IOException - for a poorly formatted file, missing file

restoreBeanFromFile

public java.lang.Object restoreBeanFromFile(java.lang.String filename,
                                            java.lang.Object root)
                                     throws java.io.IOException
Populating the fields of the given object instead of instantiating a new one.

Parameters:
filename -
Returns:
Throws:
java.io.IOException - for a poorly formatted file, missing file

deleteFile

public void deleteFile(java.lang.String filename)