Class NioFileCopierWithProgressMeter

java.lang.Object
org.broadinstitute.hellbender.utils.nio.NioFileCopierWithProgressMeter

public class NioFileCopierWithProgressMeter extends Object
Class to copy a file using java.nio. Operates using paths. INSTANCES OF THIS CLASS ARE NOT THREAD-SAFE! Created by jonn on 8/27/18.
  • Field Details

    • BUFFER_SIZE_BYTES

      protected static final int BUFFER_SIZE_BYTES
      See Also:
    • DEFAULT_PROGRESS_DISPLAY_PERCENT_INCREMENT

      protected static final double DEFAULT_PROGRESS_DISPLAY_PERCENT_INCREMENT
      See Also:
    • SECOND_IN_MS

      protected static final long SECOND_IN_MS
      See Also:
    • MINUTE_IN_MS

      protected static final long MINUTE_IN_MS
      See Also:
    • HOUR_IN_MS

      protected static final long HOUR_IN_MS
      See Also:
    • DAY_IN_MS

      protected static final long DAY_IN_MS
      See Also:
    • KB_TO_BYTES

      protected static final int KB_TO_BYTES
      See Also:
    • MS_TO_SEC

      protected static final int MS_TO_SEC
      See Also:
    • NANOS_TO_MILLIS

      protected static final int NANOS_TO_MILLIS
      See Also:
    • NANOS_TO_SECONDS

      protected static final int NANOS_TO_SECONDS
      See Also:
    • COPY_SPEED_HISTORY_SIZE

      protected static final int COPY_SPEED_HISTORY_SIZE
      See Also:
    • OVERWRITE_EXISTING_DEFAULT

      protected static final boolean OVERWRITE_EXISTING_DEFAULT
      See Also:
    • VERBOSITY_DEFAULT

      protected static final NioFileCopierWithProgressMeter.Verbosity VERBOSITY_DEFAULT
    • source

      protected final Path source
    • dest

      protected final Path dest
    • srcFileSize

      protected long srcFileSize
    • srcFileSizeNumDigits

      protected int srcFileSizeNumDigits
    • checksum

      protected String checksum
    • messageDigest

      protected MessageDigest messageDigest
    • expectedChecksum

      protected String expectedChecksum
    • overwriteExisting

      protected boolean overwriteExisting
    • verbosity

    • formatTimeRemainingAsTimestamp

      protected boolean formatTimeRemainingAsTimestamp
    • copyBuffer

      protected final byte[] copyBuffer
    • progressPercentDisplayIncrement

      protected double progressPercentDisplayIncrement
    • downloadBytesPerMilliSecond

      protected final Queue<Double> downloadBytesPerMilliSecond
    • copyComplete

      protected boolean copyComplete
    • totalBytesRead

      protected long totalBytesRead
    • progressBytesRead

      protected long progressBytesRead
    • lastProgressValue

      protected double lastProgressValue
    • lastProgressTime_ns

      protected long lastProgressTime_ns
  • Constructor Details

  • Method Details