|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--superwaba.ext.xplat.sync.RemoteCatalog
This class represents a Palm DataBase that is being synchronized.
| Field Summary | |
protected int |
mode
|
protected java.lang.String |
name
|
protected boolean |
open
|
protected int |
recIndex
|
static int |
RECORD_SIZE_AUTO
|
protected int |
wRecordSize
|
| Constructor Summary | |
RemoteCatalog(java.lang.String name)
Opens a remote catalog in READ_ONLY mode. |
|
RemoteCatalog(java.lang.String name,
int mode)
Opens a remote catalog in the given mode. |
|
RemoteCatalog(java.lang.String name,
int mode,
int recordSize)
Opens a remote catalog with the given name. |
|
| Method Summary | |
boolean |
close()
Closes this catalog. |
void |
delete()
Completely deletes this database, closing it first. |
boolean |
deleteRecord(int index)
Deletes the given record index. |
int |
getNextModifiedRecordIndex()
Returns the next modified record index. |
int |
getRecordCount()
Returns the number of records inside this database |
int |
getRecordPos()
Returns the current record position or -1 if there is no current record. |
boolean |
isOpen()
Returns if this remote catalog is open or closed. |
static java.lang.String[] |
listCatalogs(int crtr,
int type)
Lists the available catalogs on the device that has the given creator id and type. |
boolean |
readRecord(int index,
RemoteCatalogRecord rec)
Fetches the given index, passing to the rec a DataStream to read the record information. |
int |
skipBytes(int count)
Offsets the cursor in the current record a number of bytes. |
boolean |
writeRecord(int index,
RemoteCatalogRecord rec)
Write the record at the given index. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.lang.String name
protected int mode
protected boolean open
protected int recIndex
protected int wRecordSize
public static int RECORD_SIZE_AUTO
| Constructor Detail |
public RemoteCatalog(java.lang.String name,
int mode,
int recordSize)
name - The catalog name on the form name.crtr.typemode - Can be Catalog.READ_ONLY, Catalog.WRITE_ONLY, Catalog.READ_WRITE, Catalog.CREATE (this one is non
destructive: if the catalog not exists, it will be created and it will remain open on
WRITE_ONLY mode; if it exists, it will stay open on WRITE_ONLY mode). You can also or the mode with Catalog.DB_ATTR_BACKUP or
Catalog.DB_ATTR_STREAM to set these attributes when creating a database (do NOT use the other attributes!)recordSize - Used only when writing records. If you plan to write records with fixed size, pass in the desired size. Otherwise, pass
RemoteCatalog.RECORD_SIZE_AUTO to automatically expand or shrink the record.public RemoteCatalog(java.lang.String name)
RemoteCatalog(String, int, int)
public RemoteCatalog(java.lang.String name,
int mode)
RemoteCatalog(String, int, int)| Method Detail |
public boolean isOpen()
public void delete()
public int getRecordCount()
public boolean readRecord(int index,
RemoteCatalogRecord rec)
public boolean writeRecord(int index,
RemoteCatalogRecord rec)
public int getRecordPos()
public boolean deleteRecord(int index)
delete
and then create it again.public int skipBytes(int count)
count - the number of bytes to skip.public int getNextModifiedRecordIndex()
public boolean close()
public static java.lang.String[] listCatalogs(int crtr,
int type)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||