More Related Content
Similar to 20120822_dstn技術交流会_すぐに使えるsdkアダプタ開発
Similar to 20120822_dstn技術交流会_すぐに使えるsdkアダプタ開発 (20)
20120822_dstn技術交流会_すぐに使えるsdkアダプタ開発
- 23. public class PrintLogOperation implements Operation {
private final OperationContext context;
public PrintLogOperation(OperationContext context) throws Exception {
this.context = context;
}
public Map execute(Map inputData)throws Exception {
Object data = inputData.get(ComponentIOKeys.DEFAULT_RESULT_KEY); 入力データを取得
ByteArrayOutputStream bout = new ByteArrayOutputStream(8192);
XmlHandler handler = PrintingHandlerFactory.createXmlPrintHandler(bout, "UTF-8", true);
XmlParser parser = DataParserFactory.newXmlParser(data ); XML パーサを作成
parser.parse(handler); XML データをパースして bout に出
力
context.log().info(new String(bout.toByteArray(), “UTF-8”)); bout を文字列にしてログに出
力
return new HashMap();
}
}
- 25. お問い合わせは… 株式会社アプレッソ
TEL:03-4321-1111
E-mail:info@appresso.com
URL:http://www.appresso.com/