org.freehep.util.io
Class OnDiskProperties
java.lang.Object
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)
OnDiskProperties
public OnDiskProperties(String file,
int recordLength,
boolean write)
throws FileNotFoundException
- Throws:
FileNotFoundException
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.