|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectnet.argius.stu.io.CharacterStream
文字ストリームを表現するクラスです。
機能的には、java.io.Reader
とjava.io.Writer
の
両方を実装しており、両方のストリームが同じ文字列バッファを共有する構造を提供しています。
コンストラクタの概要 | |
CharacterStream()
文字ストリームを生成します。 |
メソッドの概要 | |
InputStream |
getInputAsciiStream()
このストリームをASCIIで読み取るためのストリームを取得します。 |
OutputStream |
getOutputAsciiStream()
このストリームにASCIIで書き込むためのストリームを取得します。 |
long |
getPosition()
現在のカーソル位置を返します。 |
Reader |
getReader()
リーダを取得します。 |
Writer |
getWriter()
ライタを取得します。 |
long |
length()
ストリームのデータサイズを返します。 |
char |
read()
ストリームから現在カーソル位置のデータを読み込みます。 |
char |
read(long index)
ストリームから指定した位置のデータを読み込みます。 |
void |
setAbsolutePosition(long absolutePosition)
カーソル位置を指定した位置に移動します。 |
void |
setRelativePosition(int relativePosition)
カーソル位置を現在の相対位置に移動します。 |
String |
toString()
ストリームの文字列表現を返します。 |
void |
trancate(long length)
このストリームのサイズを指定した長さに切り詰めます。 |
void |
write(char ch)
ストリームに文字を書き込みます。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
public CharacterStream()
メソッドの詳細 |
public long length()
public char read(long index) throws ArrayIndexOutOfBoundsException
index
- 指定位置
ArrayIndexOutOfBoundsException
- 指定位置がバッファの外を指している場合public char read() throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- 指定位置がバッファの外を指している場合public void write(char ch)
ch
- 文字public void trancate(long length)
length
- 切り詰める長さpublic long getPosition()
public void setAbsolutePosition(long absolutePosition)
absolutePosition
- 絶対位置
ArrayIndexOutOfBoundsException
- 指定位置がバッファの外を指している場合public void setRelativePosition(int relativePosition)
relativePosition
- 相対位置
ArrayIndexOutOfBoundsException
- 指定位置がバッファの外を指している場合public Reader getReader()
public Writer getWriter()
public InputStream getInputAsciiStream()
public OutputStream getOutputAsciiStream()
public String toString()
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |