ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/XMLReader/UDPReaderThread.java
(Generate patch)

Comparing experimental/server/XMLReader/UDPReaderThread.java (file contents):
Revision 1.2 by pjm2, Fri Nov 17 12:16:39 2000 UTC vs.
Revision 1.3 by pjm2, Fri Nov 17 14:45:56 2000 UTC

# Line 6 | Line 6 | public class UDPReaderThread extends Thread{
6  
7      public UDPReaderThread(DatagramPacket packet){
8          try {
9 <            xml = new String(packet.getData());
9 >            rawPacket = packet.getData();
10          }
11          catch (Exception e) {
12              System.out.println("An exception occured while attempting to return an XMLPacket!");
# Line 16 | Line 16 | public class UDPReaderThread extends Thread{
16      
17      public void run(){
18  
19 +        String xml = new String(rawPacket);
20 +        xml = xml.substring(0, xml.indexOf(0));
21 +
22          System.out.println("UDPReaderThread - Received the following raw stuff: "+xml);
23  
24          XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml);
# Line 31 | Line 34 | public class UDPReaderThread extends Thread{
34          // ....
35      }
36      
37 <    String xml;
37 >    byte[] rawPacket;
38   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines