Android Question RandomAccessFile characters at start of line

daveinhull

Active Member
Licensed User
Longtime User
Hi all,

Hopefully just a quick question, which is more about learning than other things, so either a quick answer or pointer in the right direction that would good, or even both :)

I've set up a RandomAccessFile and have output some text. When I look at the actual file on the Android there are 8 (random) characters at the start of every line. So am I right that this is the line information?

I'm using WriteObject, is there a way to just get the string and CRLF?

Thanks in advance
Dave
 

DonManfred

Expert
Licensed User
Longtime User
is you just want to see the text inside the file then you should use writestring
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. WriteObject must write some additional information in order to know the object type.
2. As @DonManfred wrote you should use File.WriteString if you want to create a text file.
3. If you want to write more complex objects then use B4XSerializator or raf.WriteB4XObject.
4. Check KeyValueStore2. It is a simple and powerful data store.
 
Upvote 0
Top