50 |
|
public void run(){ |
51 |
|
// get a queue for ourselves |
52 |
|
int n = _queue.getQueue(); |
53 |
< |
// keep this out here, saves recreating the object |
53 |
> |
// keep these out here, saves recreating the object |
54 |
|
String xml = null; |
55 |
|
while(true) { |
56 |
|
// get a String of xml |
69 |
|
else { |
70 |
|
xml = xml.substring(0, xml.length()); |
71 |
|
} |
72 |
+ |
|
73 |
+ |
|
74 |
+ |
// Bundle the XML all on one line (saves space and simplifies |
75 |
+ |
// the protocol between clientinterface and client. |
76 |
+ |
StringTokenizer tokenizer = new StringTokenizer(new String(xml), "\n"); |
77 |
+ |
xml = ""; |
78 |
+ |
while (tokenizer.hasMoreTokens()) { |
79 |
+ |
xml += tokenizer.nextToken(); |
80 |
+ |
} |
81 |
+ |
|
82 |
|
|
83 |
|
// Use XMLPacketMaker to make an XMLPacket object. |
84 |
|
XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml); |