--- projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java 2001/01/12 00:45:25 1.15 +++ projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java 2001/01/15 10:09:49 1.16 @@ -17,8 +17,8 @@ import uk.ac.ukc.iscream.util.*; * Now grabs data from a single queue, rather than * waiting to be contacted. * - * @author $Author: tdb $ - * @version $Id: FilterThread.java,v 1.15 2001/01/12 00:45:25 tdb Exp $ + * @author $Author: pjm2 $ + * @version $Id: FilterThread.java,v 1.16 2001/01/15 10:09:49 pjm2 Exp $ */ public class FilterThread extends Thread{ @@ -27,7 +27,7 @@ public class FilterThread extends Thread{ /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.15 $"; + public final String REVISION = "$Revision: 1.16 $"; //---STATIC METHODS--- @@ -50,7 +50,7 @@ public class FilterThread extends Thread{ public void run(){ // get a queue for ourselves int n = _queue.getQueue(); - // keep this out here, saves recreating the object + // keep these out here, saves recreating the object String xml = null; while(true) { // get a String of xml @@ -69,6 +69,16 @@ public class FilterThread extends Thread{ else { xml = xml.substring(0, xml.length()); } + + + // Bundle the XML all on one line (saves space and simplifies + // the protocol between clientinterface and client. + StringTokenizer tokenizer = new StringTokenizer(new String(xml), "\n"); + xml = ""; + while (tokenizer.hasMoreTokens()) { + xml += tokenizer.nextToken(); + } + // Use XMLPacketMaker to make an XMLPacket object. XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml);