to.tetramorph.starbase
クラス SplashOutputStream

java.lang.Object
  上位を拡張 java.io.OutputStream
      上位を拡張 to.tetramorph.starbase.SplashOutputStream
すべての実装されたインタフェース:
Closeable, Flushable

public class SplashOutputStream
extends OutputStream

標準出力をパイプで入力ストリームに接続し、他のスレッドからそれを読み出せる ようにする。 標準出力をこの出力ストリームに置換する。このクラスのgetReader()を使って、 System.out.println()等で出力されたものを受信できる。 元の標準出力は保存されていて、それにも同じように出力される。


コンストラクタの概要
SplashOutputStream(PrintStream sysout)
          オブジェクトを作成する。
 
メソッドの概要
 InputStreamReader getReader()
          System.out.printされたものを受け取るリーダーを返す。
 void write(byte[] buf, int off, int len)
           
 void write(int c)
           
 
クラス java.io.OutputStream から継承されたメソッド
close, flush, write
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SplashOutputStream

public SplashOutputStream(PrintStream sysout)
                   throws IOException
オブジェクトを作成する。

パラメータ:
sysout - System.outをそのまま渡す。内部で保持され、revoverSystemOut() で元の状態に復元できる。
例外:
IOException
メソッドの詳細

getReader

public InputStreamReader getReader()
System.out.printされたものを受け取るリーダーを返す。

戻り値:

write

public void write(int c)
           throws IOException
定義:
クラス OutputStream 内の write
例外:
IOException

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException
オーバーライド:
クラス OutputStream 内の write
例外:
IOException