public static Sha256Hash hashFileContents(File f) throws IOException {
  FileInputStream in=new FileInputStream(f);
  try {
    return create(ByteStreams.toByteArray(in));
  }
  finally {
    in.close();
  }
}

public static Sha256Hash hashFileContents ( File f ) throws IOException { FileInputStream in = new FileInputStream ( f ) ; try { return create ( ByteStreams . toByteArray ( in ) ) ; } finally { in . close ( ) ; } }
returns a hash of the given files contents . reads the file fully into memory before hashing so only use with small files .
