aspose file tools*
The moose likes Beginning Java and the fly likes Calculation of total bits in a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calculation of total bits in a file" Watch "Calculation of total bits in a file" New topic
Author

Calculation of total bits in a file

Gupta Nitin
Greenhorn

Joined: Feb 05, 2007
Posts: 7
Can anyone suggest an API method to calculate the checksum of an image? Why isn't there a method in File class to calculate total number of bits in a file?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

You might look at the java.util.zip.CRC32 class.

Why isn't this in "File"? Because java.io.File represents an abstract file path. It doesn't do anything with the contents of files.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calculation of total bits in a file