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 TypeClassDescriptionclass
Result of fixity matchstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected byte[]
protected int
protected static final boolean
protected ArrayList<CloudChecksum.Digest>
protected long
protected String
protected int
protected static final String
protected long
protected String
protected static final String
protected long
protected static int
protected long
protected int
protected CloudStoreInf
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CloudChecksum
(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
finishDigest
(CloudChecksum.Digest inDigest) static org.cdlib.mrt.utility.MessageDigestType
getAlgorithm
(String algorithmS) getChecksum
(String checksumType) static CloudChecksum
getChecksums
(String[] types, CloudStoreInf service, String bucket, String key) static CloudChecksum
getChecksums
(String[] types, CloudStoreInf service, String bucket, String key, Integer maxsize) long
getKey()
protected Properties
getMeta
(int retry) long
int
protected InputStream
getStream
(long start, long stop, int retry) static void
static void
void
process()
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
-