code: private CacheReadResultEntry getSingleMemoryReadResultEntry(long resultStartOffset, int maxLength) {
          Exceptions.checkNotClosed(this.closed, this);
  
          if (maxLength > 0 && checkReadAvailability(resultStartOffset, false) == ReadAvailability.Available) {
              // Look up an entry in the index that contains our requested start offset.
              synchronized (this.lock) {
                  ReadIndexEntry indexEntry = this.indexEntries.get(resultStartOffset);
                  if (indexEntry != null && indexEntry.isDataEntry()) {
                      // We found an entry; return a result for it.
                      return createMemoryRead(indexEntry, resultStartOffset, maxLength, true);
                  }
              }
          }
  
          // Nothing could be found in the cache at the given offset.
          return null;
      }
docs: Returns a CacheReadResultEntry that matches the specified search parameters, but only if the data is readily available
  in the cache and if there is an index entry that starts at that location.. As opposed from getSingleReadResultEntry(),
  this method will return null if the requested data is not available.
  
  @param resultStartOffset The Offset within the StreamSegment where to start returning data from.
  @param maxLength         The maximum number of bytes to return.
  @return A CacheReadResultEntry representing the data to return.