I'm going to put the text information to "data.bin" file in binary mode.
Then i'm goint to read that information from file.

I did by using "FileOutputStream", then "ObjectOutputStream" class and his "writeObject();" method, but this one just puts serialized object data to file, and as I understand - that's bad for efficiency. So, how I should save this data in binary.

----
Also, using "InputStream" and "read(bytes, offset, bytes.length-offset)" i know how to read Int's, floats's and maybe char[1], by reading datatype byte lenght portions. But how is with strings? Or I must read one by one chars, then try to do sth line php's explode() searching for [spaces] and new line-feeds?

Well, any solutions (?)

If you look the String API you will find a method that converts the String into a bytes array. I don't know though if this is going to be useful for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.