I am not sure how the files should be stored as.
After the header, should the data be stored as plain text.
Java uses UTF-16 as default encoding, and on opening the file when generated using UTF-16, it is comes like boxes/chars.
I am trying to use US-ASCII to write to the file, but the generate file doesnt seem to contain plain text.
I am using RandomAccessFile.
Here is like a sample code, I am writing.
Please help
raf.seek(length);
raf.writeChars(new
String(lr.location.getBytes("US-ASCII"),"US-ASCII"));
raf.writeInt(lr.size);
raf.writeChars(new String(lr.rate.getBytes(),"US-ASCII"));
raf.writeChars(new String(lr.smoking.getBytes(),"US-ASCII"));
raf.writeChars(new String(lr.date.getBytes(),"US-ASCII"));
raf.writeChars(new String(lr.owner.getBytes(),"US-ASCII"));