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.4 by pjm2, Fri Nov 17 14:49:13 2000 UTC vs.
Revision 1.7 by pjm2, Tue Nov 21 10:27:24 2000 UTC

# Line 4 | Line 4 | import java.util.*;
4  
5   public class UDPReaderThread extends Thread{
6  
7 <    public UDPReaderThread(DatagramPacket packet){
8 <        try {
9 <            rawPacket = packet.getData();
10 <        }
11 <        catch (Exception e) {
12 <            System.out.println("An exception occured while attempting to return an XMLPacket!");
13 <            e.printStackTrace();
14 <        }
7 >    public UDPReaderThread(){
8 >        // no-args constructor.
9      }
10      
11 +    public void run(DatagramPacket packet){
12 +        rawPacket = packet.getData();
13 +        start();
14 +    }
15 +    
16 +    public void run(String xml){
17 +        rawPacket = xml.getBytes();
18 +        start();
19 +    }
20 +    
21      public void run(){
22  
23          // Get a string without any null characters in it.
# Line 32 | Line 36 | public class UDPReaderThread extends Thread{
36          packet.printAll();
37          // Now do something with this XMLPacket!!!
38          // .... but what? ;-)
39 +    
40      }
41      
42      byte[] rawPacket;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines