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()等で出力されたものを受信できる。
元の標準出力は保存されていて、それにも同じように出力される。
クラス 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