Closeable
, Flushable
, Appendable
, AutoCloseable
public class RoutablePrintWriter extends PrintWriter
Modifier and Type | Class | Description |
---|---|---|
static interface |
RoutablePrintWriter.DestinationFactory |
Factory to lazily instantiate the destination.
|
private static class |
RoutablePrintWriter.NullWriter |
Just to keep super constructor for PrintWriter happy - it's never actually used.
|
Modifier and Type | Field | Description |
---|---|---|
private PrintWriter |
destination |
|
private RoutablePrintWriter.DestinationFactory |
factory |
out
Constructor | Description |
---|---|
RoutablePrintWriter(RoutablePrintWriter.DestinationFactory factory) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
checkError() |
|
void |
close() |
|
void |
flush() |
|
private PrintWriter |
getDestination() |
|
void |
print(boolean b) |
|
void |
print(char c) |
|
void |
print(char[] s) |
|
void |
print(double d) |
|
void |
print(float f) |
|
void |
print(int i) |
|
void |
print(long l) |
|
void |
print(Object obj) |
|
void |
print(String s) |
|
void |
println() |
|
void |
println(boolean x) |
|
void |
println(char x) |
|
void |
println(char[] x) |
|
void |
println(double x) |
|
void |
println(float x) |
|
void |
println(int x) |
|
void |
println(long x) |
|
void |
println(Object x) |
|
void |
println(String x) |
|
void |
updateDestination(RoutablePrintWriter.DestinationFactory factory) |
|
void |
write(char[] buf) |
|
void |
write(char[] buf,
int off,
int len) |
|
void |
write(int c) |
|
void |
write(String s) |
|
void |
write(String s,
int off,
int len) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, append, append, clearError, format, format, printf, printf, setError
private PrintWriter destination
private RoutablePrintWriter.DestinationFactory factory
public RoutablePrintWriter(RoutablePrintWriter.DestinationFactory factory)
private PrintWriter getDestination()
public void updateDestination(RoutablePrintWriter.DestinationFactory factory)
public void close()
close
in interface AutoCloseable
close
in interface Closeable
close
in class PrintWriter
public void println(Object x)
println
in class PrintWriter
public void println(String x)
println
in class PrintWriter
public void println(char[] x)
println
in class PrintWriter
public void println(double x)
println
in class PrintWriter
public void println(float x)
println
in class PrintWriter
public void println(long x)
println
in class PrintWriter
public void println(int x)
println
in class PrintWriter
public void println(char x)
println
in class PrintWriter
public void println(boolean x)
println
in class PrintWriter
public void println()
println
in class PrintWriter
public void print(Object obj)
print
in class PrintWriter
public void print(String s)
print
in class PrintWriter
public void print(char[] s)
print
in class PrintWriter
public void print(double d)
print
in class PrintWriter
public void print(float f)
print
in class PrintWriter
public void print(long l)
print
in class PrintWriter
public void print(int i)
print
in class PrintWriter
public void print(char c)
print
in class PrintWriter
public void print(boolean b)
print
in class PrintWriter
public void write(String s)
write
in class PrintWriter
public void write(String s, int off, int len)
write
in class PrintWriter
public void write(char[] buf)
write
in class PrintWriter
public void write(char[] buf, int off, int len)
write
in class PrintWriter
public void write(int c)
write
in class PrintWriter
public boolean checkError()
checkError
in class PrintWriter
public void flush()
flush
in interface Flushable
flush
in class PrintWriter