クラス TextStream

文字列への読み書きストリーム


コンストラクタの概要
static  TextStream new()
          初期化を行う
 
メソッドの概要
 void close()
          ストリームを閉じる
 string get()
          現在の読み込み位置から 1 文字を読み込み、読み書き位置を一つ進める
 int getPointer()
          現在の読み書き位置を取得する
 string readLine()
          現在の読み込み位置から、改行またはファイル末端まで読み込む
 boolean ready()
          テキストストリームが読み込み可能な状態かどうかを返す
 void setPointer(int value)
          現在の読み書き位置を設定する
 string toString()
          ストリームに書きこまれた文字列を連結し、返す
 void write(string str)
          文字列をストリームに書きこむ
 void writeLine(string str)
          文字列をストリームに書きこむ。
 
コンストラクタの詳細

new

public static TextStream new()

初期化を行う

戻り値:
メソッドの詳細

close

public void close()

ストリームを閉じる


get

public string get()

現在の読み込み位置から 1 文字を読み込み、読み書き位置を一つ進める

戻り値:
読み込んだ文字

getPointer

public int getPointer()

現在の読み書き位置を取得する

戻り値:
現在の読み書き位置

readLine

public string readLine()

現在の読み込み位置から、改行またはファイル末端まで読み込む

戻り値:
読み込んだ文字列

ready

public boolean ready()

テキストストリームが読み込み可能な状態かどうかを返す

戻り値:
読み込み可能であれば true を、そうでなければ false を返す

setPointer

public void setPointer(int value)

現在の読み書き位置を設定する

パラメータ:
value - 設定する読み書き位置

toString

public string toString()

ストリームに書きこまれた文字列を連結し、返す

戻り値:
文字列

write

public void write(string str)

文字列をストリームに書きこむ

パラメータ:
str - 書きこむ文字列

writeLine

public void writeLine(string str)

文字列をストリームに書きこむ。末尾に改行文字を追加する

パラメータ:
str - 書きこむ文字列