Class TextStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.sun.javatest.util.TextStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
This class implements an output stream that has additional methods for
printing. It is similar to java.io.PrintStream except that it does not swallow
exceptions.
-
Field Summary
Fields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionTextStream(OutputStream out) Creates a new TextStream.TextStream(OutputStream out, boolean autoflush) Creates a new TextStream. -
Method Summary
Methods inherited from class OutputStream
nullOutputStream
-
Constructor Details
-
TextStream
-
TextStream
Creates a new TextStream.- Parameters:
out- the output streamautoflush- set to true to flush the stream after each newline character is written
-
-
Method Details
-
print
Prints a String.- Parameters:
s- the String to be printed- Throws:
IOException- if there is a problem writing to the stream
-
println
Prints a newline.- Throws:
IOException- if there is a problem writing to the stream
-
println
Prints a string followed by a newline.- Parameters:
s- the String to be printed- Throws:
IOException- if there is a problem writing to the stream
-