org.gcube.indexmanagement.featureindexlibrary.vafile.io
Class FileBufferWriter

java.lang.Object
  extended by org.gcube.indexmanagement.featureindexlibrary.vafile.io.FileBufferWriter

public class FileBufferWriter
extends Object

Buffer file writer helper

Author:
UoA

Constructor Summary
FileBufferWriter(String file, VAFileParams params)
          Creates a new instance
 
Method Summary
 boolean addElement(FeatureVectorElement elem)
          Adds an element
 void close()
          Closes
 void openForUpdate()
          Opens for update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBufferWriter

public FileBufferWriter(String file,
                        VAFileParams params)
Creates a new instance

Parameters:
file - The file
params - The VAFIle header params
Method Detail

openForUpdate

public void openForUpdate()
                   throws Exception
Opens for update

Throws:
Exception - An error

addElement

public boolean addElement(FeatureVectorElement elem)
                   throws Exception
Adds an element

Parameters:
elem - The element
Returns:
if the write was successful or not
Throws:
Exception - An error

close

public void close()
           throws Exception
Closes

Throws:
Exception - An error


Copyright © 2013. All Rights Reserved.