wabadma.util
Class DWCatalog
java.lang.Object
|
+--waba.io.Stream
|
+--waba.io.Catalog
|
+--wabadma.util.DWCatalog
- public class DWCatalog
- extends waba.io.Catalog
DWCatalog is an extension of waba's Catalog class for writing and
reading Whipples to a PalmOS device. This class is intended for use
by simple programs to save & load state when exited and restarted.
Very little to no error checking is done. When reading a database
typically one should use the inherited isOpen and getRecordCount methods
after creating the DWCatalog object to check if the database is
existing, not empty, and sane. When writing, one should typically
clear the database after creating the DWCatalog object and before writing to
it.
- Version:
- 1.0, 2000 Nov 23
- Author:
- David M. Archer
- See Also:
Whipple
Fields inherited from class waba.io.Catalog |
_dbHash, CREATE, READ_ONLY, READ_WRITE, WRITE_ONLY |
Constructor Summary |
DWCatalog(java.lang.String f)
Create a new DWCatalog object using the database name given. |
Methods inherited from class waba.io.Catalog |
addRecord, close, delete, deleteRecord, getRecordCount, getRecordSize, isOpen, listCatalogs, readBytes, resizeRecord, setRecordPos, skipBytes, writeBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DWCatalog
public DWCatalog(java.lang.String f)
- Create a new DWCatalog object using the database name given.
- Parameters:
f
- name of database to use
clear
public void clear()
- Clear the current database. All records are deleted, the database
itself is not removed.
writeNewWhipple
public int writeNewWhipple(Whipple w)
- Write a Whipple to the end of the current database.
readWhipple
public Whipple readWhipple(int pos)
- Read the Whipple at the given position in the database.
- Parameters:
pos
- position in database of Whipple to read.
readWhipple
public Whipple readWhipple()
- Read the next Whipple in the database.