Retrieve a record from a record store

  1. Import the following classes:
    • javax.microedition.rms.RecordStore
    • java.lang.String
  2. Invoke getRecord(int, byte[], int). Pass the following parameters:
    • a record ID
    • a byte array
    • an offset
    byte[] data = new byte[store.getRecordSize(id)];
    store.getRecord(id, data, 0);
    String dataString = new String(data);

Index


Was this information helpful? Send us your comments.