docs: int read(final long off, final byte[] buf, final int bufStart, final int numBytesToRead)
              throws IOException, InterruptedException {
          if (off < 0 || bufStart < 0 || bufStart + numBytesToRead > buf.length) {
              throw new IndexOutOfBoundsException();
          }
          int currBufStart = bufStart;
          int remainingBytesToRead = numBytesToRead;
          int totBytesRead = 0;
          for (long currOff = off; remainingBytesToRead > 0;) {
              // Find the ByteBuffer chunk to read from
              final long currOffAbsolute = zipFileSlice.startOffsetWithinPhysicalZipFile + currOff;
              final int chunkIdx = (int) (currOffAbsolute / FileUtils.MAX_BUFFER_SIZE);
              final ByteBuffer chunk = getChunk(chunkIdx);
              final long chunkStartAbsolute = ((long) chunkIdx) * (long) FileUtils.MAX_BUFFER_SIZE;
              final int startReadPos = (int) (currOffAbsolute - chunkStartAbsolute);
  
              // Read from current chunk.
              // N.B. the cast to Buffer is necessary, see:
              // https://github.com/plasma-umass/doppio/issues/497#issuecomment-334740243
              // https://github.com/classgraph/classgraph/issues/284#issuecomment-443612800
              // Otherwise compiling in JDK<9 compatibility mode using JDK9+ causes runtime breakage. 
              ((Buffer) chunk).mark();
              ((Buffer) chunk).position(startReadPos);
              final int numBytesRead = Math.min(chunk.remaining(), remainingBytesToRead);
              try {
                  chunk.get(buf, currBufStart, numBytesRead);
              } catch (final BufferUnderflowException e) {
                  // Should not happen
                  throw new EOFException("Unexpected EOF");
              }
              ((Buffer) chunk).reset();
  
              currOff += numBytesRead;
              currBufStart += numBytesRead;
              totBytesRead += numBytesRead;
              remainingBytesToRead -= numBytesRead;
          }
          return totBytesRead == 0 && numBytesToRead > 0 ? -1 : totBytesRead;
      }