下载里面有API文档 http://apache.etoak.com/commons/net/binaries/commons-net-1.4.1.zip这个写的很好 http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/5.html TFTP Packets in Java TFTPpacket.java contains the data members of the class, methods to send/receive TFTP packets, and utility methods for the subclasses. TFTPack.java is the most straight forward TFTP packet subclass. It handles ACK packets which have exactly one field. TFTPerror.java describes TFTP error packets. TFTPread.java describes TFTP read request packets. I think it is possible to combine this class with the write class but I did not bother. TFTPwrite.java describes write requests. TFTPdata.java describes the data packets. This class provides methods that will read and write the data directly to a file. http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/6.html A TFTP Client in Java http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/7.html Handling Timeouts The file udpReader.java contains code to implement reading in a separate thread. The file timeout.java contains a template for a main program. http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/8.html A Java TFTP Server
你说的太抽象了 不是太明白,是要实现 FTP 服务器 跟客户端之前的通讯还是什么?
http://apache.etoak.com/commons/net/binaries/commons-net-1.4.1.zip这个写的很好
http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/5.html
TFTP Packets in Java
TFTPpacket.java contains the data members of the class, methods to send/receive TFTP packets, and utility methods for the subclasses.
TFTPack.java is the most straight forward TFTP packet subclass. It handles ACK packets which have exactly one field.
TFTPerror.java describes TFTP error packets.
TFTPread.java describes TFTP read request packets. I think it is possible to combine this class with the write class but I did not bother.
TFTPwrite.java describes write requests.
TFTPdata.java describes the data packets. This class provides methods that will read and write the data directly to a file. http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/6.html
A TFTP Client in Java
http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/7.html
Handling Timeouts
The file udpReader.java contains code to implement reading in a separate thread. The file timeout.java contains a template for a main program. http://www.vorlesungen.uos.de/informatik/networking-programming/notes/28Nov96/8.html
A Java TFTP Server