}
long length = endingPosition - startingPosition;
final long totalLength = length;
IndexInput input = new ThrottledIndexInput(dir.openInput(fileName, IOContext.READ), _maxBytesPerSec);
try {
input.seek(startingPosition);
byte[] buf = new byte[8192];
long start = System.nanoTime();
long bytesReadPerPass = 0;
while (length > 0) {
long now = System.nanoTime();