Examples of TreeHash


Examples of org.jclouds.glacier.util.TreeHash

*/
public class BindHashesToHeaders implements Binder {

   private HttpRequest addChecksumHeaders(HttpRequest request, Payload payload) {
      try {
         TreeHash hash = TreeHash.buildTreeHashFromPayload(payload);
         request = request.toBuilder()
               .addHeader(GlacierHeaders.LINEAR_HASH, hash.getLinearHash().toString())
               .addHeader(GlacierHeaders.TREE_HASH, hash.getTreeHash().toString())
               .build();
      } catch (IOException e) {
         throw new HttpException("Error hashing the payload", e);
      }
      return request;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.