File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Info on UDP checksums Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Info on UDP checksums" Watch "Info on UDP checksums" New topic
Author

Info on UDP checksums

Neil Forrest
Greenhorn

Joined: Apr 03, 2005
Posts: 13
Hi,
Can anyone steer me to easy to follow information on doing checksums and in particular with UDP?
Thanks,
Neil
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
Well, you can calculate a checksum using two different classes in Java. You can use the java.util.zip.CRC32 or the java.util.zip.Adler32 implementations.

Both of them implement java.util.zip.Checksum.

Now, when it comes to UDP Datgram packets. You can update the Checksum until you have sent or received all the data, and then calculate the checksum.

Somewhat like this:



Good luck, comrade!
[ June 09, 2006: Message edited by: Edwin Dalorzo ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Info on UDP checksums