Package edu.rit.io
Class Stdio
java.lang.Object
edu.rit.io.Stdio
Class Stdio provides standard I/O streams that can be redirected on a
per-thread basis.
- Version:
- 08-Oct-2010
- Author:
- Alan Kaminsky
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrintStreamerr()Get the standard error stream for the calling thread.static voiderr(PrintStream stream) Set the standard error stream for the calling thread.static InputStreamin()Get the standard input stream for the calling thread.static voidin(InputStream stream) Set the standard input stream for the calling thread.static PrintStreamout()Get the standard output stream for the calling thread.static voidout(PrintStream stream) Set the standard output stream for the calling thread.
-
Method Details
-
in
Get the standard input stream for the calling thread.- Returns:
- Standard input stream.
-
out
Get the standard output stream for the calling thread.- Returns:
- Standard output stream.
-
err
Get the standard error stream for the calling thread.- Returns:
- Standard error stream.
-
in
Set the standard input stream for the calling thread. If not set, the default isSystem.in.- Parameters:
stream- Standard input stream.- Throws:
NullPointerException- (unchecked exception) Thrown ifstreamis null.
-
out
Set the standard output stream for the calling thread. If not set, the default isSystem.out.- Parameters:
stream- Standard output stream.- Throws:
NullPointerException- (unchecked exception) Thrown ifstreamis null.
-
err
Set the standard error stream for the calling thread. If not set, the default isSystem.err.- Parameters:
stream- Standard error stream.- Throws:
NullPointerException- (unchecked exception) Thrown ifstreamis null.
-