code: public InputStream getInputStream() throws IOException {
          URLConnection con = url.openConnection();
          useCachesIfNecessary(con);
          try {
              return con.getInputStream();
          } catch (IOException ex) {
              // Close the HTTP connection (if applicable).
              if (con instanceof HttpURLConnection) {
                  ((HttpURLConnection) con).disconnect();
              }
              throw ex;
          }
      }
docs: This implementation opens an InputStream for the given URL.
  It sets the "UseCaches" flag to <code>false</code>,
  mainly to avoid jar file locking on Windows.
  
  @return The input stream
  @throws IOException if there is an error
  @see java.net.URL#openConnection()
  @see java.net.URLConnection#setUseCaches(boolean)
  @see java.net.URLConnection#getInputStream()