A subclass of
java.io.Writer
allows you to use the familiar
print()
and println()
methods
Can be chained to an OutputStreamWriter
to handle non-default character
sets properly.
Automatic flushing is performed only when println()
is invoked, not every time a newline character is seen.
println()
is still dangerous
PrintStream
is unofficially deprecated
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 buf[], int offset, int length)
public void write(char buf[])
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 x)
public void println(char x)
public void println(int x)
public void println(long x)
public void println(float x)
public void println(double x)
public void println(char x[])
public void println(String x)
public void println(Object x)