|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectnet.argius.stu.IOManager
入出力システムの基底クラスです。 このアプリケーションが使用する入出力インターフェイスを管理します。 それぞれ、入力機能を「スキャナ」、出力機能を「プリンタ」と呼びます。 アプリケーションでは、1つのスキャナと2つのプリンタ(出力とエラー出力)を 使用するため、これらを保持します。
Scanner,
Printer| コンストラクタの概要 | |
IOManager()
|
|
| メソッドの概要 | |
void |
close()
入出力マネージャを閉じます。 |
protected Application |
getApplication()
アプリケーションオブジェクトを取得します。 |
protected Printer |
getErrorPrinter()
エラープリンタを取得します。 |
static String |
getLineSeparator()
改行文字を取得します。 |
protected Printer |
getOutputPrinter()
出力プリンタを取得します。 |
protected Scanner |
getScanner()
スキャナを取得します。 |
abstract void |
printMessage(String message,
boolean newLine)
この入出力マネージャの出力にメッセージを送出します。 |
abstract String |
scanLine()
この入出力マネージャの入力から文字列を1行読み取ります。 |
protected void |
setApplication(Application newApp)
アプリケーションオブジェクトを設定します。 |
protected void |
setErrorPrinter(Printer err)
エラープリンタを設定します。 |
protected void |
setOutputPrinter(Printer out)
出力プリンタを設定します。 |
protected void |
setScanner(Scanner in)
スキャナを設定します。 |
abstract int |
showResult(ResultSet rs,
int limit)
この入出力マネージャの出力に実行結果を送出します。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public IOManager()
| メソッドの詳細 |
public abstract String scanLine()
throws IOException
IOException - 入出力エラー
public abstract int showResult(ResultSet rs,
int limit)
throws IOException,
SQLException
rs - 結果セットlimit - 最大表示件数 0以下は無制限
IOException - 入出力エラー
SQLException - データベースアクセスエラー
public abstract void printMessage(String message,
boolean newLine)
throws IOException
message - メッセージ文字列newLine - 改行する場合はtrue、しない場合はfalse
IOException - 入出力エラーpublic void close()
public static final String getLineSeparator()
protected final Scanner getScanner()
protected void setScanner(Scanner in)
in - スキャナprotected final Printer getOutputPrinter()
protected void setOutputPrinter(Printer out)
out - 出力プリンタprotected final Printer getErrorPrinter()
protected void setErrorPrinter(Printer err)
err - エラープリンタprotected final Application getApplication()
protected final void setApplication(Application newApp)
newApp - アプリケーションオブジェクト
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||