Take a look at this article and see if after reading that you have any specific questions. You can use the java.security.MessageDigest class to digest/hash the contents of a file in Java. Take a look at the documentation there and see if that brings up any specific questions.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter