combined = in;
}
final long start = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
CountingInputStream counter = new CountingInputStream(combined);
LZFInputStream lzfIn = new LZFInputStream(counter);
try {
lzfIn.readAndWrite(out);
} finally {
_close(lzfIn);
if (_diagnostics != null) {
final long totalSpent = _timeMaster.nanosForDiagnostics() - start;
// Not good, but need to try avoiding double-booking so assume 1/4 for response write
long respTime = (totalSpent >> 2);
_diagnostics.addResponseWriteTime(respTime);
_diagnostics.addFileReadAccess(start, start, start + totalSpent - respTime,
counter.readCount());
}
}
return null;
}
});
// Fast case is out of file-access lock so must be handled here
if (fullBuffer != null) {
final long start = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
LZFInputStream lzfIn = new LZFInputStream(new BufferBackedInputStream(fullBuffer));
try {
lzfIn.readAndWrite(out);
} finally {
_close(lzfIn);
if (_diagnostics != null) {
_diagnostics.addResponseWriteTime(start, _timeMaster);
}