code: Cookie[] getCookies(String uri){
          if( null == cookies || 0 == cookies.size()) return null;
  
          for(Cookie cookie: cookies){
  
              if("".equals(cookie.getDomain())){
                  String domain = uri.replaceAll("^.*:\\/\\/([^\\/]+)[\\/]?.*$", "$1");
                  cookie.setDomain(domain);
                  cookie.setPath("/");
                  cookie.setExpiryDate(null);
                  cookie.setSecure(false);
              }
          }
  
          return cookies.toArray(new Cookie[cookies.size()]);
      }
docs: Return a Cookie array
  and auto importing domain and path when domain was empty.
  
  @param uri required Apache Common VFS supported file systems and response JSON format content.
  @return Cookie[]