The class is a subclass of allows you to use the familiar print() and println() methods. It's very similar to the class. The main difference is that it properly handles multiple byte and other non ISO Latin-1 character sets. The other, more minor difference, is that automatic flushing is performed only when println() is invoked, not every time a newline character is seen.

Sun would like to deprecate PrintStream and use PrintWriter instead, but that would break too much existing code.

 public PrintWriter(Writer out)
 public PrintWriter(Writer out, boolean autoFlush)
 public PrintWriter(OutputStream out)
 public PrintWriter(OutputStream out, boolean autoFlush)
 public void flush()
 public void close()
 public boolean checkError()
 protected void setError()
 public void write(int c)
 public void write(char[] text, int offset, int length)
 public void write(char[] text)
 public void write(String s,
 public void write(String s)
 public void print(boolean b)
 public void print(char c)
 public void print(int i)
 public void print(long l)
 public void print(float f)
 public void print(double d)
 public void print(char s[])
 public void print(String s)
 public void print(Object obj)
 public void println()
 public void println(boolean b)
 public void println(char c)
 public void println(int i)
 public void println(long l)
 public void println(float f)
 public void println(double d)
 public void println(char[] text)
 public void println(String s)
 public void println(Object o)

Previous | Next | Top | Cafe au Lait

Copyright 1997, 2003, 2006 Elliotte Rusty Harold
Last Modified April 6, 2006