wood burning stoves
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calculation of total bits in a file" Watch "Calculation of total bits in a file" New topic

Calculation of total bits in a file

Gupta Nitin

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

Joined: Jul 08, 2003
Posts: 24193

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
It's not a secret anymore!