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).


Field Summary
(package private)  InputStream is
           
(package private)  PrintWriter pw
           
(package private)  StringWriter sw
           
 
Constructor Summary
(package private) SunJavaCompiler.Sucker(InputStream is, PrintWriter pw)
          Constructs a Sucker
 
Method Summary
 void run()
           
 String toString()
           
private  void write(char[] b, int bytesRead)
           
private  void write(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

is

InputStream is

pw

PrintWriter pw

sw

StringWriter sw
Constructor Detail

SunJavaCompiler.Sucker

SunJavaCompiler.Sucker(InputStream is,
                       PrintWriter pw)
Constructs a Sucker

Parameters:
is - stream to read from
pw - writer to echo output to (may be null)
Method Detail

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

SourceForge.net_Logo