Class CloudChecksum

java.lang.Object
org.cdlib.mrt.s3.tools.CloudChecksum

public class CloudChecksum extends Object
Author:
replic
  • Field Details

    • NAME

      protected static final String NAME
      See Also:
    • MESSAGE

      protected static final String 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

      protected ArrayList<CloudChecksum.Digest> digestList
    • segCnt

      protected int segCnt
    • runTime

      protected long runTime
    • inputSize

      protected long inputSize
    • service

      protected CloudStoreInf service
    • bucket

      protected String bucket
    • key

      protected String key
    • metaObjectSize

      protected long metaObjectSize
    • physicalObjectSize

      protected long physicalObjectSize
    • metaSha256

      protected String 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

      protected Properties getMeta(int retry) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • main

      public static void main(String[] args)
    • mainTest

      public static void mainTest(String[] types, long node, String testKey) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • dump

      public void dump(String header)
    • 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

      public String getChecksum(String checksumType) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • getDigest

      public CloudChecksum.Digest getDigest(String checksumType) throws org.cdlib.mrt.utility.TException
      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

      public Long getMetaObjectSize()
    • getMetaSha256

      public String getMetaSha256()
    • getSegCnt

      public int getSegCnt()
    • getRunTime

      public long getRunTime()
    • getBucket

      public String getBucket()
    • getKey

      public String getKey()
    • getAlgorithm

      public static org.cdlib.mrt.utility.MessageDigestType getAlgorithm(String algorithmS)
    • getDigestList

      public ArrayList<CloudChecksum.Digest> 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