help about java code regarding udp, JAVA Programming

I need to know waht exactly is happining in the following code
class Worker implements Runnable {

DatagramSocket socket = null;
DatagramPacket packet = null;

public Worker (DatagramSocket socket, DatagramPacket packet) {
this.socket = socket;
this.packet = packet;
}
public void run() {

try {
BufferedReader fileCopyBuffer = new BufferedReader(new InputStreamReader(new FileInputStream ("NormanConquest.txt")));
String line;
while ((line = fileCopyBuffer.readLine()) != null) {
DatagramPacket response = new DatagramPacket(line.getBytes(), line.length(),packet.getAddress() , packet.getPort());
System.out.print(".");
socket.send(response); } } catch (Exception e){;};
}

}
Posted Date: 1/25/2013 12:07:12 PM | Location : Malta







Related Discussions:- help about java code regarding udp, Assignment Help, Ask Question on help about java code regarding udp, Get Answer, Expert's Help, help about java code regarding udp Discussions

Write discussion on help about java code regarding udp
Your posts are moderated
Related Questions
Employee get data from console


Operator Functionality E x ample/Explanation = Sets one value equal to another counter=0  Sets the counter to equivale

Explain java.lang.string library in java? Strings are objects. Specifically they're instances of the class java.lang.String . This class has several methods which are useful f

Open A java applet should appear on your screen. Click on File, OpenImage and select Asterix. Check Homography box. By clicking on the images you can select points. The c

Develop Contact list application Project Description: Prepare a computer application to help employees manage their contact list. Users must be able to store two kinds of con

Consider the following C++ template class. #include using namespace std; template class SortedList { public: SortedList() {size = 0;} void insert(T item); friend ostrea

What is Arithmetic promotion assignment and casting? In an assignment statement, i.e. if there's an equals sign, Java compares the type of the left hand side to the at last typ

There are two significant bean lifecycle methods. The first one is setup which is called when the bean is loaded on to the container. The second method is the teardown method which

in java string is a