LHA Library for Java

jp.gr.java_conf.dangan.io
Class DisconnectableOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by jp.gr.java_conf.dangan.io.DisconnectableOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, Disconnectable

public class DisconnectableOutputStream
extends java.io.OutputStream
implements Disconnectable

データを処理して出力する出力ストリームと データをデバイスに出力するストリームとの 接続を解除するためのユーティリティクラス。

 -- revision history --
 $Log: DisconnectableOutputStream.java,v $
 Revision 1.0  2002/07/24 00:00:00  dangan
 add to version control
 [maintenance]
     タブ廃止
     ライセンス文の修正
     ソース整備
 
 

Version:
$Revision: 1.0 $
Author:
$Author: dangan $

Constructor Summary
DisconnectableOutputStream(java.io.OutputStream out)
          out との接続を解除可能な出力ストリームを構築する。
 
Method Summary
 void close()
          接続された出力ストリームとの接続を解除する。
このメソッドは disconnect() を呼び出すだけである。
 void disconnect()
          接続された出力ストリームとの接続を解除する。
 void flush()
          接続された出力ストリームに蓄えられたデータを全て出力する ように指示する。
 void write(byte[] buffer)
          接続された出力ストリームに buffer内のデータを 全て出力する。
 void write(byte[] buffer, int index, int length)
          接続された出力ストリームに buffer内のデータを indexで指定された位置から lengthバイト出力する。
 void write(int data)
          接続された出力ストリームに 1バイトのデータを出力する。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisconnectableOutputStream

public DisconnectableOutputStream(java.io.OutputStream out)
out との接続を解除可能な出力ストリームを構築する。

Parameters:
out - 出力ストリーム
Method Detail

write

public void write(int data)
           throws java.io.IOException
接続された出力ストリームに 1バイトのデータを出力する。

Specified by:
write in class java.io.OutputStream
Parameters:
data - 書きこまれるべき 1バイトのデータ。
一般的に上位3バイトは無視される。
Throws:
java.io.IOException - 入出力エラーが発生した場合

write

public void write(byte[] buffer)
           throws java.io.IOException
接続された出力ストリームに buffer内のデータを 全て出力する。

Overrides:
write in class java.io.OutputStream
Parameters:
buffer - 書きこまれるべきデータを格納した バイト配列。
Throws:
java.io.IOException - 入出力エラーが発生した場合

write

public void write(byte[] buffer,
                  int index,
                  int length)
           throws java.io.IOException
接続された出力ストリームに buffer内のデータを indexで指定された位置から lengthバイト出力する。

Overrides:
write in class java.io.OutputStream
Parameters:
buffer - 書きこまれるべきデータを格納した バイト配列。
index - buffer内の書きこむべきデータの開始位置。
length - 書きこむべきデータ量。
Throws:
java.io.IOException - 入出力エラーが発生した場合

flush

public void flush()
           throws java.io.IOException
接続された出力ストリームに蓄えられたデータを全て出力する ように指示する。

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException - 入出力エラーが発生した場合

close

public void close()
接続された出力ストリームとの接続を解除する。
このメソッドは disconnect() を呼び出すだけである。

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

disconnect

public void disconnect()
接続された出力ストリームとの接続を解除する。

Specified by:
disconnect in interface Disconnectable

LHA Library for Java

When you found typographical errors or omissions, Please mail to cqw10305@nifty.com
The company name and product name which are used in this document, it is the trademark or registered trademark of each company generally.
Copyright © 2001-2002 Michel Ishizuka. All Rights Reserved.