Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.microedition.rms
Class RecordStore  view RecordStore download RecordStore.java

java.lang.Object
  extended byjavax.microedition.rms.RecordStore

public class RecordStore
extends java.lang.Object


Nested Class Summary
(package private)  class RecordStore.RecordEnumerationImpl
           
 
Field Summary
private  long lastModified
           
private  java.lang.String name
           
private  int nextRecordID
           
private  boolean open
           
private  java.util.Vector recordListeners
           
private  java.util.Hashtable records
           
private static java.util.Hashtable recordStores
           
private  int version
           
 
Constructor Summary
private RecordStore(java.lang.String name)
           
 
Method Summary
 int addRecord(byte[] data, int offset, int numBytes)
           
 void addRecordListener(RecordListener listener)
           
 void closeRecordStore()
           
 void deleteRecord(int recordId)
           
static void deleteRecordStore(java.lang.String recordStoreName)
           
 RecordEnumeration enumerateRecords(RecordFilter filter, RecordComparator comparator, boolean keepUpdated)
           
private  void fireAddedRecordListener(int recordId)
           
private  void fireChangedRecordListener(int recordId)
           
private  void fireDeletedRecordListener(int recordId)
           
 long getLastModified()
           
 java.lang.String getName()
           
 int getNextRecordID()
           
 int getNumRecords()
           
 byte[] getRecord(int recordId)
           
 int getRecord(int recordId, byte[] buffer, int offset)
           
 int getRecordSize(int recordId)
           
 int getSizeAvailable()
           
 int getVersion()
           
static java.lang.String[] listRecordStores()
           
static RecordStore openRecordStore(java.lang.String recordStoreName, boolean createIfNecessary)
           
 void removeRecordListener(RecordListener listener)
           
 void setRecord(int recordId, byte[] newData, int offset, int numBytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

recordStores

private static java.util.Hashtable recordStores

name

private java.lang.String name

open

private boolean open

version

private int version

lastModified

private long lastModified

nextRecordID

private int nextRecordID

recordListeners

private java.util.Vector recordListeners

records

private java.util.Hashtable records
Constructor Detail

RecordStore

private RecordStore(java.lang.String name)
Method Detail

deleteRecordStore

public static void deleteRecordStore(java.lang.String recordStoreName)
                              throws RecordStoreException,
                                     RecordStoreNotFoundException

openRecordStore

public static RecordStore openRecordStore(java.lang.String recordStoreName,
                                          boolean createIfNecessary)
                                   throws RecordStoreException,
                                          RecordStoreFullException,
                                          RecordStoreNotFoundException

closeRecordStore

public void closeRecordStore()
                      throws RecordStoreNotOpenException,
                             RecordStoreException

listRecordStores

public static java.lang.String[] listRecordStores()

getName

public java.lang.String getName()

getVersion

public int getVersion()
               throws RecordStoreNotOpenException

getNumRecords

public int getNumRecords()
                  throws RecordStoreNotOpenException

getSizeAvailable

public int getSizeAvailable()

getLastModified

public long getLastModified()
                     throws RecordStoreNotOpenException

addRecordListener

public void addRecordListener(RecordListener listener)

removeRecordListener

public void removeRecordListener(RecordListener listener)

getNextRecordID

public int getNextRecordID()
                    throws RecordStoreNotOpenException,
                           RecordStoreException

addRecord

public int addRecord(byte[] data,
                     int offset,
                     int numBytes)
              throws RecordStoreNotOpenException,
                     RecordStoreException,
                     RecordStoreFullException

deleteRecord

public void deleteRecord(int recordId)
                  throws RecordStoreNotOpenException,
                         InvalidRecordIDException,
                         RecordStoreException

getRecordSize

public int getRecordSize(int recordId)
                  throws RecordStoreNotOpenException,
                         InvalidRecordIDException,
                         RecordStoreException

getRecord

public int getRecord(int recordId,
                     byte[] buffer,
                     int offset)
              throws RecordStoreNotOpenException,
                     InvalidRecordIDException,
                     RecordStoreException

getRecord

public byte[] getRecord(int recordId)
                 throws RecordStoreNotOpenException,
                        InvalidRecordIDException,
                        RecordStoreException

setRecord

public void setRecord(int recordId,
                      byte[] newData,
                      int offset,
                      int numBytes)
               throws RecordStoreNotOpenException,
                      InvalidRecordIDException,
                      RecordStoreException,
                      RecordStoreFullException

enumerateRecords

public RecordEnumeration enumerateRecords(RecordFilter filter,
                                          RecordComparator comparator,
                                          boolean keepUpdated)
                                   throws RecordStoreNotOpenException

fireAddedRecordListener

private void fireAddedRecordListener(int recordId)

fireChangedRecordListener

private void fireChangedRecordListener(int recordId)

fireDeletedRecordListener

private void fireDeletedRecordListener(int recordId)