If your OS and printer supports it, you can access a printer like you would a file, like in this example from
the old Java Programmer's FAQ:
One thing I feel the need to point out,
PrintStream and
PrintWriter don't actually have anything to do with printing-to-paper. Their purpose is to make it easy to write formatted representations of objects to a stream, along with some other convenience features.
[ October 09, 2008: Message edited by: Joe Ess ]