java.io.PrintWriter
class is a subclass of
java.io.Writer
allows you to use the familiar
print()
and println()
methods. It's very similar to the java.io.PrintStream 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.
Javasoft 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 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)