org.egothor.store
Class ProximitiesFileOut

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

public class ProximitiesFileOut
extends java.lang.Object

The ProximitiesFileOut object defines a writer of proximities of terms.

Author:
Leo Galambos

Constructor Summary
ProximitiesFileOut(java.lang.String filename)
          Constructor for the ProximitiesFileOut object.
 
Method Summary
 void close()
          Close the output stream and mark for garbage collection.
 long save(Proximities p)
          Write the given Proximities to this object's output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProximitiesFileOut

public ProximitiesFileOut(java.lang.String filename)
                   throws java.io.IOException
Constructor for the ProximitiesFileOut object. A file will be created with the given name. If the file exists it is overwritten.

Parameters:
filename - the name of the file
Throws:
java.io.IOException
Method Detail

save

public long save(Proximities p)
          throws java.io.IOException
Write the given Proximities to this object's output stream. It returns a handle - an offset where the p Proximities starts.

Parameters:
p - the Proximities to write
Returns:
an offset where the written Proximities begin
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the output stream and mark for garbage collection.

Throws:
java.io.IOException