long prevCount = 0L;
while (left > 0) {
final long start = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
int count = in.read(copyBuffer, 0, (int) Math.min(copyBuffer.length, left));
if (_diagnostics != null) {
long newCount = counter.readCount();
_diagnostics.addFileReadAccess(start, _timeMaster, newCount-prevCount);
prevCount = newCount;
}
if (count <= 0) {
break;