• Post Reply Bookmark Topic Watch Topic
  • New Topic

Validating that a FTP arrived uncorrupted  RSS feed

 
Michael Arnett
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have built a simple FTP server and was wanting to add some code that would validate that any file that is sent to the server, arrives uncorrupted. Any thoughts would be appreciated.
Thanks in advance,
-MLA
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CRC numbers are used for just this kind of thing. Compute a CRC before sending, compute again after receiving and they should match. Of course, now you have to send the number along with the file. Maybe in another file, maybe tacked on the beginning or end of the file in question. Good things are rarely free
Google for Java CRC for more hints.
 
Michael Arnett
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response Stan. I will check it out.
-MLA
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!