org.duracloud.services.hadoop.store
Class MD5Util

java.lang.Object
  extended by org.duracloud.services.hadoop.store.MD5Util

public class MD5Util
extends Object

This class is a utility for getting an MD5 for a local file or from a file stored in DuraCloud.

Author:
Andrew Woods Date: Oct 14, 2010

Constructor Summary
MD5Util()
           
 
Method Summary
 String getMd5(File file)
          This method returns the MD5 of the arg file.
 String getMd5(org.apache.hadoop.fs.s3.S3Credentials s3Credentials, String bucketId, String contentId)
          This method returns the MD5 of the arg content item.
protected  org.jets3t.service.S3Service getS3Service(org.apache.hadoop.fs.s3.S3Credentials s3Credentials)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5Util

public MD5Util()
Method Detail

getMd5

public String getMd5(File file)
This method returns the MD5 of the arg file.

Parameters:
file - for which MD5 is sought
Returns:
MD5 or error message

getMd5

public String getMd5(org.apache.hadoop.fs.s3.S3Credentials s3Credentials,
                     String bucketId,
                     String contentId)
This method returns the MD5 of the arg content item.

Parameters:
s3Credentials - to connect to S3
bucketId - of content item
contentId - of content item
Returns:
MD5 or error message

getS3Service

protected org.jets3t.service.S3Service getS3Service(org.apache.hadoop.fs.s3.S3Credentials s3Credentials)
                                             throws org.jets3t.service.S3ServiceException
Throws:
org.jets3t.service.S3ServiceException


Copyright © 2009-2011 DuraSpace. All Rights Reserved.