Mercurial > hg > RemoteEditor > REPSessionManager
comparison test/XMLTest.java @ 386:bba62c4ac323
sync-option
author | one@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 10 Nov 2008 22:19:34 +0900 |
parents | 4b87f89b3afd |
children | 6f356d160e58 |
comparison
equal
deleted
inserted
replaced
385:1fca50ce3508 | 386:bba62c4ac323 |
---|---|
1 package test; | 1 package test; |
2 | |
3 import java.io.IOException; | |
4 | |
5 import org.xml.sax.SAXException; | |
2 | 6 |
3 import rep.Session; | 7 import rep.Session; |
4 import rep.SessionList; | 8 import rep.SessionList; |
5 import rep.handler.Editor; | 9 import rep.handler.Editor; |
6 import rep.xml.SessionXMLDecoder; | 10 import rep.xml.SessionXMLDecoder; |
39 System.out.println(t1); | 43 System.out.println(t1); |
40 SessionList sessionlist2; | 44 SessionList sessionlist2; |
41 SessionXMLDecoder decoder = new SessionXMLDecoder(); | 45 SessionXMLDecoder decoder = new SessionXMLDecoder(); |
42 try { | 46 try { |
43 sessionlist2 = decoder.decode(t1); | 47 sessionlist2 = decoder.decode(t1); |
44 } catch (Exception e) { | 48 } catch (SAXException e) { |
49 return; | |
50 } catch (IOException e) { | |
45 return; | 51 return; |
46 } | 52 } |
53 | |
47 | 54 |
48 /*** SessionList から XML へ ***/ | 55 /*** SessionList から XML へ ***/ |
49 //SessionXMLEncoder encoder2 = new SessionXMLEncoder(sessionlist2.getList()); | 56 //SessionXMLEncoder encoder2 = new SessionXMLEncoder(sessionlist2.getList()); |
50 System.out.println(encoder.sessionListToXML(sessionlist2)); | 57 System.out.println(encoder.sessionListToXML(sessionlist2)); |
51 | 58 |