org.egothor.store
Class TermsWriter

java.lang.Object
  extended by org.egothor.store.TermsWriter

public class TermsWriter
extends java.lang.Object

TermsWriter implements a writer of the structure that is described in Terms.

Author:
Leo Galambos

Constructor Summary
TermsWriter(java.lang.String location)
          Constructor for the TermsWriter object.
 
Method Summary
 boolean addElement(IListMetadataWrite obj)
          Appends the given element with the given key to the structure.
 void close()
          Flush all open buffers and close the files of the data structure.
protected  void finalize()
          Close this object and mark resources for garbage collection.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermsWriter

public TermsWriter(java.lang.String location)
            throws java.io.IOException
Constructor for the TermsWriter object. The writer will store the data structure to the given directory which must exist.

Parameters:
location - the directory to store the data structure in
Throws:
java.io.IOException - if an I/O error occurs
java.io.IOException - if an I/O error occurs
Method Detail

addElement

public boolean addElement(IListMetadataWrite obj)
Appends the given element with the given key to the structure.

Parameters:
obj - the element.
Returns:
Description of the Return Value

close

public void close()
Flush all open buffers and close the files of the data structure.


finalize

protected void finalize()
                 throws java.lang.Throwable
Close this object and mark resources for garbage collection.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - who knows when trying to collect garbage?