/**
  * Sets the number of bytes already copied.
  *
  * @see #showCopyDetails(boolean)
  * @see #setTotalCount(long)
  * @param count number of bytes already copied.
  * @since 2.0
  */
 public void setCopyCount(long count) {
   if (showDetails && count > 0) {
     currentCount = count;
     long countK = count / 1024;
     long totalK = totalCopyCount / 1024;
     String msg =
         (totalK <= 0)
             ? NLS.bind(
                 Messages.InstallMonitor_DownloadSize, (new String[] {Long.toString(countK)}))
             : NLS.bind(
                 Messages.InstallMonitor_DownloadSizeLong,
                 (new String[] {Long.toString(countK), Long.toString(totalK)}));
     monitor.subTask(subTaskString + msg);
   }
 }
예제 #2
0
 /** Sets the total length of the file being imported. */
 public void setLength(long length) {
   props.put(KEY_LENGTH, Long.toString(length));
 }