Package org.cdlib.mrt.s3.tools
Class CloudChecksum
java.lang.Object
org.cdlib.mrt.s3.tools.CloudChecksum
- Author:
- replic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassResult of fixity matchstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected byte[]protected intprotected static final booleanprotected ArrayList<CloudChecksum.Digest> protected longprotected Stringprotected intprotected static final Stringprotected longprotected Stringprotected static final Stringprotected longprotected static intprotected longprotected intprotected CloudStoreInf -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCloudChecksum(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidfinishDigest(CloudChecksum.Digest inDigest) static org.cdlib.mrt.utility.MessageDigestTypegetAlgorithm(String algorithmS) getChecksum(String checksumType) static CloudChecksumgetChecksums(String[] types, CloudStoreInf service, String bucket, String key) static CloudChecksumgetChecksums(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) longgetKey()protected PropertiesgetMeta(int retry) longintprotected InputStreamgetStream(long start, long stop, int retry) static voidstatic voidvoidprocess()validateSizeChecksum(String passedChecksum, String passedChecksumTypeS, long passedFileSize, org.cdlib.mrt.utility.LoggerInf logger) Get the download size and checksum for this file
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
RETRY
protected static int RETRY -
buffsize
protected int buffsize -
maxsize
protected int maxsize -
digestList
-
segCnt
protected int segCnt -
runTime
protected long runTime -
inputSize
protected long inputSize -
service
-
bucket
-
key
-
metaObjectSize
protected long metaObjectSize -
physicalObjectSize
protected long physicalObjectSize -
metaSha256
-
buf
protected byte[] buf
-
-
Constructor Details
-
CloudChecksum
protected CloudChecksum(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
-
Method Details
-
getChecksums
public static CloudChecksum getChecksums(String[] types, CloudStoreInf service, String bucket, String key) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getChecksums
public static CloudChecksum getChecksums(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getMeta
- Throws:
org.cdlib.mrt.utility.TException
-
main
-
mainTest
public static void mainTest(String[] types, long node, String testKey) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
dump
-
process
public void process() throws org.cdlib.mrt.utility.TException- Throws:
org.cdlib.mrt.utility.TException
-
getStream
protected InputStream getStream(long start, long stop, int retry) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getChecksum
- Throws:
org.cdlib.mrt.utility.TException
-
getDigest
- Throws:
org.cdlib.mrt.utility.TException
-
finishDigest
public static void finishDigest(CloudChecksum.Digest inDigest) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getMetaObjectSize
-
getMetaSha256
-
getSegCnt
public int getSegCnt() -
getRunTime
public long getRunTime() -
getBucket
-
getKey
-
getAlgorithm
-
getDigestList
-
getInputSize
public long getInputSize() -
validateSizeChecksum
public CloudChecksum.CloudChecksumResult validateSizeChecksum(String passedChecksum, String passedChecksumTypeS, long passedFileSize, org.cdlib.mrt.utility.LoggerInf logger) throws org.cdlib.mrt.utility.TException Get the download size and checksum for this file- Throws:
org.cdlib.mrt.utility.TException
-