getPMPrinterListメソッド
帳票サーバのOSに登録されているプリンタの一覧を取得します。
形式
public ArrayList getPMPrinterList ( ) throws EURPMException
引数
なし
戻り値
帳票サーバに登録されたOS上のプリンタ一覧を,次に示す形式で返します。
<配列イメージ>
OS上のプリンタ名1
OS上のプリンタ名2
:
OS上のプリンタ名n
例外処理
EURPMException
エラー発生時は,EURPMException例外がスローされます。
呼び出し例
getPMPrinterListメソッドの呼び出し例を次に示します。
try {
adp = new EURPMAdapterForJava();
}
catch (Exception e) {
System.out.println("Adapterオブジェクト生成エラー");
}
System.out.println("getPMPrinterList実行");
try{
ArrayList alPrinters=adp.getPMPrinterList();
for(cntj=0;cntj<alPrinters.size();cntj++){
System.out.println("帳票サーバ上のプリンタ名
=["+alPrinters.get(cntj)+"]");
}
}
catch(EURPMException e){
intiCode=e.getErrorCode();
System.out.println(Integer.toString(iCode));
System.out.println(e.getMessage());
System.out.println(e.getKey());
e.printStackTrace();
}