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

Computer application and program, Computer application and program. Proj...

Computer application and program. Project Description: I require a project done. It is a computer desktop application program. It is not very hard. Skills required: Any

Explain multiple initializers and incrementers, Explain Multiple Initialize...

Explain Multiple Initializers and Incrementers ? Sometimes it's essential to initialize several variables before starting a for loop. Similarly you may need to increment more t

Important nodes, there are N nodes in a graph, the graph isuni directional ...

there are N nodes in a graph, the graph isuni directional with M edges of these M nodes in a graph, there are K nodes which are important nodes. given initial position I within thi

GUI, I have a GUI assignment due Friday noon and i can''t get my hand on it...

I have a GUI assignment due Friday noon and i can''t get my hand on it will anyone be able to solve it to me and what is the cost?

Program to brute force search, Ask questionWrite a program BruteForceSearch...

Ask questionWrite a program BruteForceSearch that uses the brute-force approach given above and compare its running time on your computer with that of Binary Search for largeW.txt

Tokenize a algebraic expr and sorted, ? • ?read from a file a series of an ...

? • ?read from a file a series of an infix algebraic expressions comprised of constant and variable operands (integers), operands (%, *, /, +, -) and parenthesis. Two slashes (//)

What should be public and private, What should be public? What should be pr...

What should be public? What should be private? As a rule of thumb: Classes are public. Fields are private. Constructors are public. Getter and setter methods

Design a bond class, In the lectures, we have written programs for bond pri...

In the lectures, we have written programs for bond pricing in discrete time. We have also talked about the theory for bond pricing and yields in continuous time. In this exercise,

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