all methods throw java.io.IOException in the case of an I/O error
Thread-safety note:
The access to the underlying output stream is not synchronized.
This class is based on an example from The Java Network Programming, 2nd edition,
written by Elliotte Rusty Harold.
Field Summary |
protected java.io.Writer |
out
|
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
SafePrintWriter(java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding)
|
SafePrintWriter(java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding,
java.lang.String lineSeparator)
|
SafePrintWriter(java.io.Writer out,
boolean autoFlush)
|
SafePrintWriter(java.io.Writer out,
boolean autoFlush,
java.lang.String lineSeparator)
|
SafePrintWriter(java.io.Writer out,
java.lang.String lineSeparator)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected java.io.Writer out
SafePrintWriter
public SafePrintWriter(java.io.Writer out,
java.lang.String lineSeparator)
SafePrintWriter
public SafePrintWriter(java.io.Writer out,
boolean autoFlush)
SafePrintWriter
public SafePrintWriter(java.io.Writer out,
boolean autoFlush,
java.lang.String lineSeparator)
SafePrintWriter
public SafePrintWriter(java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
SafePrintWriter
public SafePrintWriter(java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding,
java.lang.String lineSeparator)
throws java.io.UnsupportedEncodingException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(int c)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(char[] text,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(char[] text)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.lang.String s,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(boolean b)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(boolean b)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(char c)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(char c)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(int i)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(int i)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(long l)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(long l)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(float f)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(float f)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(double d)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(double d)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(char[] text)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(char[] text)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(java.lang.Object o)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println(java.lang.Object o)
throws java.io.IOException
- Throws:
java.io.IOException
println
public void println()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.