/** return progress based on the amount of data processed so far. */
 public float getProgress() throws IOException, InterruptedException {
   long subprogress = 0; // bytes processed in current split
   if (null != curReader) {
     // idx is always one past the current subsplit's true index.
     subprogress = (long) (curReader.getProgress() * split.getLength(idx - 1));
   }
   return Math.min(1.0f, (progress + subprogress) / (float) (split.getLength()));
 }
Beispiel #2
0
 public float getProgress() throws IOException {
   return rawIn.getProgress();
 }
 @Override
 public float getProgress() throws IOException {
   return baseReader == null ? 1 : baseReader.getProgress();
 }
 @Override
 public float getProgress() throws IOException, InterruptedException {
   return originalRR.getProgress();
 }