org.freehep.util.io
Class OnDiskProperties

java.lang.Object
  extended by org.freehep.util.io.OnDiskProperties

public class OnDiskProperties
extends Object

Properties which are kept and searched on disk. Properties are kept sorted, and thus can only be added in sorted order. When read or searched either a RandomAccessFile or ResourceAsStream is used. Searching is done with a binarySearch.

Author:
Mark Donszelmann (Mark.Donszelmann@gmail.com)

Constructor Summary
OnDiskProperties(String file, int recordLength, boolean write)
           
 
Method Summary
 void add(String key, String value)
           
 void close()
           
protected  void finalize()
           
 String getProperty(String key)
           
 long size()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnDiskProperties

public OnDiskProperties(String file,
                        int recordLength,
                        boolean write)
                 throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

add

public void add(String key,
                String value)
         throws IOException
Throws:
IOException

getProperty

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

size

public long size()
          throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2012. All Rights Reserved.