×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Dec 2003
    Posts
    109

    read RMS records

    I am trying to retrieve RMS records and display them on a device. I am calling recordstore.enumerateRecords() for that, but the string for every item I receive contains two additional bytes of information (btw can anyone tell me what they are?), that I don't need to display on the device.

    Is there a better way to read entries, where I would only get contents of the record that were originally entered.

    Thanks.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    The byte array you read from the record store should be identical to the one you wrote. Did you create the byte array using the writeUTF() method of a DataOutputStream? If so, you need to decode the data by the reverse process - wrap the array in a ByteArrayInputStream, wrap that in a DataInputStream, then use readUTF() to retrieve the String.

    Graham.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×