public class DisconnectableInputStream extends java.io.InputStream implements Disconnectable
-- revision history --
$Log: DisconnectableInputStream.java,v $
Revision 1.0 2002/07/24 00:00:00 dangan
add to version control
[maintenance]
タブ廃止
ライセンス文の修正
ソース整備
| Constructor and Description |
|---|
DisconnectableInputStream(java.io.InputStream in)
in との接続を解除可能な入力ストリームを構築する。
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
接続された入力ストリームからブロックしないで
読み込むことのできるバイト数を得る。
|
void |
close()
接続された入力ストリームとの接続を解除する。
このメソッドは disconnect() を呼ぶだけである。 |
void |
disconnect()
接続された入力ストリームとの接続を解除する。
|
void |
mark(int readLimit)
接続された入力ストリームの現在位置にマークを設定し、
reset() メソッドでマークした時点の 読み込み位置に
戻れるようにする。
|
boolean |
markSupprted()
接続された入力ストリームが mark() と reset() を
サポートするかを得る。
|
int |
read()
接続された入力ストリームから 次の1バイトのデータを得る。
|
int |
read(byte[] buffer)
接続された入力ストリームから バイト配列 buffer を
満たすようにデータを読み込む。
データは必ずしも buffer を満たすとは限らないことに注意。 |
int |
read(byte[] buffer,
int index,
int length)
接続された入力ストリームから バイト配列 buffer の
index で指定された位置から length バイトのデータを
読み込む。
データは必ずしも length バイト読み込まれるとは限ら ないことに注意。 |
void |
reset()
接続された入力ストリームの読み込み位置を最後に
mark() メソッドが呼び出されたときの位置に設定する。
|
long |
skip(long length)
接続された入力ストリームのデータを length バイト
読み飛ばす。
|
public DisconnectableInputStream(java.io.InputStream in)
in - 入力ストリームpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - 入出力エラーが発生した場合public int read(byte[] buffer)
throws java.io.IOException
read in class java.io.InputStreambuffer - 読み込まれたデータを格納するためのバイト配列java.io.IOException - 入出力エラーが発生した場合public int read(byte[] buffer,
int index,
int length)
throws java.io.IOException
read in class java.io.InputStreambuffer - 読み込まれたデータを格納するためのバイト配列index - buffer内のデータ読み込み開始位置length - bufferに読み込むデータ量java.io.IOException - 入出力エラーが発生した場合public long skip(long length)
throws java.io.IOException
skip in class java.io.InputStreamlength - 読み飛ばすバイト数。java.io.IOException - 入出力エラーが発生した場合public void mark(int readLimit)
mark in class java.io.InputStreamreadLimit - マーク位置に戻れる限界のバイト数。
このバイト数を超えてデータを読み
込んだ場合 reset()できなくなる可
能性がある。public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOException - 入出力エラーが発生した場合public boolean markSupprted()
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException - 入出力エラーが発生した場合public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreampublic void disconnect()
disconnect in interface Disconnectable
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.