code: private BufferPool.Buffer getBuffer(final int pos,
                             final boolean forRead) {
      if ((curBuffer != null) && curBuffer.contains(pos)){
        return curBuffer;
      }
  
      for (BufferPool.Buffer b: buffers) {
        if (forRead) {
          if (b.contains(pos)) {
            curBuffer = b;
            return b;
          }
  
          continue;
        }
  
        if ((b.at(pos))) {
          curBuffer = b;
          return b;
        }
      }
  
      return null;
    }
docs: /* ====================================================================
  Private methods
  ====================================================================