code: ByteBuffer getByteBuffer(final int chunkIdx) throws IOException, InterruptedException {
          if (closed.get()) {
              throw new IOException(getClass().getSimpleName() + " already closed");
          }
          if (chunkIdx < 0 || chunkIdx >= mappedByteBuffersCached.length) {
              throw new IOException("Chunk index out of range");
          }
          // Fast path: only look up singleton map if mappedByteBuffersCached is null 
          if (mappedByteBuffersCached[chunkIdx] == null) {
              // This 2GB chunk has not yet been read -- mmap it (use a singleton map so that the mmap
              // doesn't happen more than once, in case of race condition)
              try {
                  mappedByteBuffersCached[chunkIdx] = chunkIdxToByteBuffer.get(chunkIdx, /* log = */ null);
              } catch (final NullSingletonException e) {
                  throw new IOException("Cannot get ByteBuffer chunk " + chunkIdx + " : " + e);
              }
          }
          return mappedByteBuffersCached[chunkIdx];
      }
docs: Get a mmap'd chunk of the file, where chunkIdx denotes which 2GB chunk of the file to return (0 for the first
  2GB of the file, or for files smaller than 2GB; 1 for the 2-4GB chunk, etc.).
  
  @param chunkIdx
  The index of the 2GB chunk to read
  @return The {@link MappedByteBuffer} for the requested file chunk, up to 2GB in size.
  @throws IOException
  If the chunk could not be mmap'd.
  @throws InterruptedException
  If the thread was interrupted.