Binary IO help
IO always gives me trouble...
Anyway, I want to use FileOutputStream to save some data to a file. But the integers that i'm trying to write are 4 or 5 digits long, and it seems that only values up to 255 can be written without it messing up.
So , how do I use FileOutputStream to save integers with 4 or 5 digits, and then recall them using FileInputStream?
instead of fileoutputstream you have to use filewriter class to write 4 or 5 digit values.
after stream creation
use function like writeline();
it certain will work.
BufferedWriter bw = new BufferedWriter(
// use [i]write(String s, int off, int len)[/i] method
BufferedReader br = new BufferedReader(
// use [i]readLine[/i] method