There's an easier way to get fixed-width chars in this forum, and it preserves spacing too, try code tags, [ code ] stuff [ /code ] without the extra spaces in the tags.
You might find
this useful. Instead of opening files you could just use System.in and System.out