aspose file tools*
The moose likes I/O and Streams and the fly likes CheckSum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "CheckSum" Watch "CheckSum" New topic
Author

CheckSum

Sandya Bhaskara
Ranch Hand

Joined: Aug 20, 2004
Posts: 73
what is checksum?how java uses it for file compression??read some notes related to checksum but its confusing...can any1 explain it in detail?


Sandy<br />SCJP1.4 SCWCD1.4<br />SCBCD(preparing)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

A "checksum" is a function that you compute using all the bytes of a file, message, or other chunk of data. If you compute the checksum before transmitting (or saving, or compressing) some data, then compute it again after the transmission (or after loading, or decompressing) then the two values should match. If they do, you can be pretty sure the transmission happened with no errors. If they don't match, you know the received data is corrupt.

One very common checksum algorithm is called CRC, "cyclic redundancy check." There's a java.util.zip.CRC32 class that implements this algorithm, and the GZIP stream classes use it to check the validity of data they process.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CheckSum
 
Similar Threads
Am I just stupid?
HashCode
Use of Checksum command
Reload a File when changes happen in that file
Checksum for Image comparison