Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to write TFTP UDP client application program

Posted on 2004-04-04
Medium Priority
Last Modified: 2012-06-22
Could anybody tell me how to write simple TFTP client program using UDP socket programming.Whose function is to issue "Read" request to  the Server  to retrive file.
Thank you
Question by:Rafi-muqaddar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 30

Expert Comment

ID: 10751400
first thing to do in such case:

i found one that looks good (the comments are in French):
LVL 13

Accepted Solution

Webstorm earned 1500 total points
ID: 10751432

Author Comment

ID: 10752358
thanx all of you for replying. Have a look on the following code:-
it is a simple UDP Echo client whose function is to echo back thorugh the server whatever typ by the user

import java.io.*;
import java.net.*;
public class UDPEchoClient
public static void main (String args[])
InetAddress host =InetAddress.getByName("localhost");
BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
byte [] buf =new byte[1024];
DatagramSocket ds = new DatagramSocket();
DatagramPacket dp;
String line;
dp =new DatagramPacket (line.getBytes(),line.length(), host,7);
System.out.println(new String(dp.getData()));

catch(IOException e)

My question is how to ammend this program inorder to work this program as a Tftp client to issue a "Read" rqeuest to the server to get the file.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question