java.lang.Object | +--java.io.Writer | +--org.erights.e.develop.exception.PrintStreamWriter
Untamed: This class shouldn't need to exist, but System.out and
System.err are both PrintStreams, and PrintStream is
deprecated in favor of PrintWriter.
XXX How should one obtain a Writer or PrintWriter to stdout and stderr? As long as we're at it, we also provide a static method for accessing System.in as a non-buffering BufferedReader (so that readline() is available).
Note that there is no reason to use this class as a type in a type declaration. No one should ever see any instances of it. Only its static methods are externally useful.
Note: As of some recent version of Java <= 1.3, PrintStream is no longer officially deprecated, probably because of System.out and System.err. However, E's TextWriters still need to wrap Writers, not PrintStreams, so we still need PrintStreamWriter.
static PrintWriter
make(PrintStream ps)
private static PrintStream lastOutStream
private static PrintWriter lastOutWriter
private static PrintStream lastErrStream
private static PrintWriter lastErrWriter
private static InputStream lastInStream
private static BufferedReader lastInReader
private final PrintStream myPS
private PrintStreamWriter(PrintStream ps)
public static PrintWriter make(PrintStream ps)
public static PrintWriter stdout()
public static PrintWriter stderr()
public static BufferedReader stdin()
public void close()
public void flush()
public void write(char[] cbuf, int off, int len)
cbuf - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write