Package org.cdlib.mrt.s3.tools
Class ChecksumHandler
java.lang.Object
org.cdlib.mrt.s3.tools.ChecksumHandler
- Author:
- replic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected byte[]protected static final booleanprotected ArrayList<ChecksumHandler.Digest> protected longprotected longprotected static final org.apache.logging.log4j.Loggerprotected static final Stringprotected static final Stringprotected static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBuff(byte[] bytes) voiddumpDigests(String header, HashMap<String, String> digests) fillBuff(byte[] bytes) fillBuff(InputStream inStream, ByteBuffer buffer, int buffSize) static voidfinishDigest(ChecksumHandler.Digest inDigest) voidlonggetAlgorithm(String algorithmS) getChecksum(String checksumType) static ChecksumHandlergetChecksumHandler(String[] types) static ChecksumHandler.DigestgetDigest(CloudStoreInf service, String bucket, String key, int retry) org.json.JSONObjectstatic ArrayList<ChecksumHandler.Digest> getDigests(String[] types) longlongstatic StringgetSha256(CloudStoreInf service, String bucket, String key)
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
RETRY
protected static int RETRY -
digestList
-
buf
protected byte[] buf -
addBufTime
protected long addBufTime -
fillBufTime
protected long fillBufTime -
fillBufBytes
protected long fillBufBytes -
log4j
protected static final org.apache.logging.log4j.Logger log4j
-
-
Constructor Details
-
ChecksumHandler
- Throws:
org.cdlib.mrt.utility.TException
-
-
Method Details
-
getChecksumHandler
public static ChecksumHandler getChecksumHandler(String[] types) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getDigests
public static ArrayList<ChecksumHandler.Digest> getDigests(String[] types) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
addBuff
public void addBuff(byte[] bytes) -
getAlgorithm
-
getChecksum
- Throws:
org.cdlib.mrt.utility.TException
-
getDigest
public ChecksumHandler.Digest getDigest(String checksumType) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
finishDigests
public void finishDigests() throws org.cdlib.mrt.utility.TException- Throws:
org.cdlib.mrt.utility.TException
-
finishDigest
public static void finishDigest(ChecksumHandler.Digest inDigest) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getDigestHashStandard
-
getDigestHashIn
-
getDigestJson
public org.json.JSONObject getDigestJson() -
dumpDigests
-
fillBuff
public Long fillBuff(InputStream inStream, ByteBuffer buffer, int buffSize) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
fillBuff
- Throws:
org.cdlib.mrt.utility.TException
-
getDigest
public static ChecksumHandler.Digest getDigest(CloudStoreInf service, String bucket, String key, int retry) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getSha256
public static String getSha256(CloudStoreInf service, String bucket, String key) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getAddBufTime
public long getAddBufTime() -
getFillBufTime
public long getFillBufTime() -
getFillBufBytes
public long getFillBufBytes()
-