JP.ac.tsukuba.openjava
Class SunJavaCompiler.Sucker
java.lang.Object
|
+--JP.ac.tsukuba.openjava.SunJavaCompiler.Sucker
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- SunJavaCompiler
- static class SunJavaCompiler.Sucker
- extends Object
- implements Runnable
A Sucker
collects the output from a reader in a string
buffer. If a print writer is specified, it also writes the output there
(like the UNIX tee
command).
is
InputStream is
pw
PrintWriter pw
sw
StringWriter sw
SunJavaCompiler.Sucker
SunJavaCompiler.Sucker(InputStream is,
PrintWriter pw)
- Constructs a
Sucker
- Parameters:
is
- stream to read frompw
- writer to echo output to (may be null)
run
public void run()
- Specified by:
run
in interface Runnable
write
private void write(char[] b,
int bytesRead)
write
private void write(String s)
toString
public String toString()
- Overrides:
toString
in class Object