The same data you wrote to the file! If you want to write a text file rather than a binary one (i.e. be able to read your file without a hex editor), use the Writer classes. Look at the Java Tutorial: IO for more info.
Question on efficiency here: what if I only print strings instead of dos.writeInt (seq); I'll say: dos.writeBytes (seq + ""); Effectively, my file would be a text file in the end (or good enough for what I need). Which is more efficient the Writer or Stream classes?
Well using dos.writeInt() will be more efficient, I'm pretty sure, but it's one of those situations where it's very unlikely you'll ever notice a difference unless you're writing a lot of data. Generally, the most important factor is how will you parse it? Using readInt() is pretty simple, if the data was written with writeInt(). Parsing text data can be more complexx, as you have to know more about the delimiters used in the file. But using a text format has one big advantage - humans can read and understand your file, just by looking at it. With bainary formats, they can't. So if you want humans to be able to do this, that often outweighs any other considerations.
"I'm not back." - Bill Harding, Twister
Joined: Jan 30, 2000
Note that you just wrote 456458. When the file is read, how will you no its not (4, 56458) or (4564, 58)? You probably need to insert some sort of delimiter.