public static String calculateTreeHash ( File file ) throws AmazonClientException { ResettableInputStream is = null ; try { is = new ResettableInputStream ( file ) ; return calculateTreeHash ( is ) ; } catch ( IOException e ) { throw new AmazonClientException ( "Unable to compute hash for file: " + file . getAbsolutePath ( ) , e ) ; } finally { if ( is != null ) is . release ( ) ; } }
Calculates a hex encoded binary hash using a tree hashing algorithm for the data in the specified file .