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
List the keywords which are used in java 1.1? The list of keywords which are used in java 1.1 are given below: Keyword Purpose boole

What are synchronized methods and synchronized statements? Synchronized methods are methods that are used to control access to an object. A thread only implements a synchronize

Running a sample Java web application from the web get http 404 error

How do you decide when to use HashMap and when to use TreeMap? When we want to perform deletion, insertion and locate elements in a Map then HashMap is used. Whereas TreeMa

This assignment requires you to design, implement and test a program using Java features from the first half of the subject content. You are required to implement in Java all the c

You want the base class to represent only an interface for its derived classes. That means, you don't want anyone to actually instantiate an object of the parent class. You only

Write a program called Power that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power. The program halts when the

how to write a program to assign value of variable age and print if person is major.

What are the difference between throw and throws? Differences are between throws and throw are: Throw is employed to trigger an exception while throws is used in declara

TextMessage having instance of java.lang.String as its payload. Therefore it is very useful for exchanging textual data. It can also be used for exchanging difficult character data