Search code examples
file-ioformattingjava1.4

Getting formatted output in file using PrintStream (java 1.4)


I have to write formatted output in the file in java 1.4 environment (for compatibility). My object is PrintStream out; and I need to write something like: out.format("%-5s", data); How Can I make that possible?


Solution

  • I realized using out.format will also work, i will need to supply buffer arguments.