org.activemath.omdocjdom.slumb
Class FileStringStorage

java.lang.Object
  extended by org.activemath.omdocjdom.slumb.FileStringStorage

public class FileStringStorage
extends Object

Simple placeholder to write streams to files and give them a key


Constructor Summary
FileStringStorage(File storageDir)
           
 
Method Summary
 void deleteKey(String key)
           
 String endWritingWithKey()
           
protected  void finalize()
           
 Reader readFromKey(String key)
           
 String readStringFromKey(String key)
           
 Writer startWriting()
           
 String writeElementXML(org.jdom.Element elt)
          Outputs the indicated element to a new segment and returns its key.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStringStorage

public FileStringStorage(File storageDir)
Method Detail

startWriting

public Writer startWriting()
                    throws IOException
Throws:
IOException

readFromKey

public Reader readFromKey(String key)
                   throws IOException
Throws:
IOException

readStringFromKey

public String readStringFromKey(String key)
                         throws IOException
Throws:
IOException

endWritingWithKey

public String endWritingWithKey()
                         throws IOException
Throws:
IOException

deleteKey

public void deleteKey(String key)
               throws IOException
Throws:
IOException

writeElementXML

public String writeElementXML(org.jdom.Element elt)
                       throws IOException
Outputs the indicated element to a new segment and returns its key.

Parameters:
elt - the element to be output
Returns:
the key-string with which to retrieve the element later
Throws:
IOException - in case output goes wrong.

finalize

protected void finalize()
Overrides:
finalize in class Object