help about java code regarding udp, JAVA Programming

Assignment Help:
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){;};
}

}

Related Discussions:- help about java code regarding udp

Finding highest and lowest numbers, Hi i need help creating a small program...

Hi i need help creating a small program that basically asks the user how many numbers hes going to use and then ask for those numbers and see which is the biggest and the smaller

Explain exception classes, OOPS with Java 1. Explain any five buzz word...

OOPS with Java 1. Explain any five buzz words in Java. 2. Explain exception classes and also explain common exceptions in java. 3. Explain primitive and abstract data typ

Authentication -security component, Authentication is basically an identifi...

Authentication is basically an identification step. Functionality used for J2EE security: Principal : An entity that may be authenticated and identified. Principal n

Prepare a computer graded test, Please check out the given instruction that...

Please check out the given instruction that I received to do the assessment. I can provide you that link to go on and submit the answers. To assess your coding skills, we would

Explain init(), Explain init(), start(), stop(), and destroy() method? ...

Explain init(), start(), stop(), and destroy() method? The init() method is known as exactly once in an applet's life, while the applet is first loaded. It's generally used to

What is role of action class, An Action Class performs a role of an adapter...

An Action Class performs a role of an adapter among the contents of an incoming HTTP request and the corresponding business logic that should be implemented to process this request

How we declaring arrays in java language, How we Declaring Arrays in java l...

How we Declaring Arrays in java language? Like all other variables in Java, an array must have a exact type such as byte, int, String or double. Just variables of the appropria

Illustrate about object oriented programming, Object Oriented Programming ...

Object Oriented Programming   Java is basically object oriented. Each line of code you write in java should be inside a class (not counting import directives). OOP fundamental

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd