code: public List<HttpCookie> get(URI uri) {
          // argument can't be null
          if (uri == null) {
              throw new NullPointerException("uri is null");
          }
  
          List<HttpCookie> cookies = new ArrayList<HttpCookie>();
          lock.lock();
          try {
              // check domainIndex first
              getInternal1(cookies, uriIndex, uri.getHost());
              // check uriIndex then
              getInternal2(cookies, uriIndex, getEffectiveURI(uri));
          } finally {
              lock.unlock();
          }
  
          return cookies;
      }
docs: Get all cookies, which:
  1) given uri domain-matches with, or, associated with
  given uri when added to the cookie store.
  3) not expired.
  See RFC 2965 sec. 3.3.4 for more detail.