docs: private byte[] loadIntern(final ChunkCacheKey key) throws IOException {
        final String fileName = key.getFileName();
        final long chunkId = key.getChunkId(); //needs to be long to upcast following operations
        int bufferSize = key.getBufferSize();
        final long seekTo = chunkId * bufferSize;
        final byte[] buffer;
        final IndexInput input = directory.openInput(fileName, IOContext.READ);
        final long length = input.length();
        try {
           if (seekTo != 0) {
              input.seek(seekTo);
           }
           bufferSize = (int) Math.min(length - seekTo, (long)bufferSize);
           buffer = new byte[bufferSize];
           input.readBytes(buffer, 0, bufferSize);
        }
        finally {
           input.close();
        }
        return buffer;
     }