public IFile.Reader openIFileReader(FetchedInput fetchedInput)
throws IOException {
if (fetchedInput.getType() == Type.MEMORY) {
MemoryFetchedInput mfi = (MemoryFetchedInput) fetchedInput;
return new InMemoryReader(null, mfi.getInputAttemptIdentifier(),
mfi.getBytes(), 0, (int) mfi.getActualSize());
} else {
return new IFile.Reader(fetchedInput.getInputStream(),
fetchedInput.getCompressedSize(), codec, null, null, ifileReadAhead,
ifileReadAheadLength, ifileBufferSize);