This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculation of total bits in a file

 
Gupta Nitin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic