raf.write() println()
in
Programming Questions
•
2 years ago
I'm merging some Java program with my own.
I have these lines:
raf = new RandomAccessFile(ff, "rw");
// Append to the end
raf.seek(raf.length());
raf.writeChars("abc");//writes 2-bytes Unicode char
raf.write("ABC".getBytes());//writes 1-byte char
raf.seek(raf.length());
raf.writeChars("abc");//writes 2-bytes Unicode char
raf.write("ABC".getBytes());//writes 1-byte char
Now how can I write to a new line, using the equivalent of println()?
I tried raf.writeln(), raf.writeLine(), raf.writeChars("/n") and raf.writeChar("/n") but doesn't work.
1