src/java.base/share/classes/java/net/URLStreamHandler.java
changeset 58242 94bb65cb37d3
parent 57895 82a71d82e326
child 58679 9c3209ff7550
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
    64      * HttpURLConnection will be returned, and for JAR a
    64      * HttpURLConnection will be returned, and for JAR a
    65      * JarURLConnection will be returned.
    65      * JarURLConnection will be returned.
    66      *
    66      *
    67      * @param      u   the URL that this connects to.
    67      * @param      u   the URL that this connects to.
    68      * @return     a {@code URLConnection} object for the {@code URL}.
    68      * @return     a {@code URLConnection} object for the {@code URL}.
    69      * @exception  IOException  if an I/O error occurs while opening the
    69      * @throws     IOException  if an I/O error occurs while opening the
    70      *               connection.
    70      *               connection.
    71      */
    71      */
    72     protected abstract URLConnection openConnection(URL u) throws IOException;
    72     protected abstract URLConnection openConnection(URL u) throws IOException;
    73 
    73 
    74     /**
    74     /**
    89      * @param      u   the URL that this connects to.
    89      * @param      u   the URL that this connects to.
    90      * @param      p   the proxy through which the connection will be made.
    90      * @param      p   the proxy through which the connection will be made.
    91      *                 If direct connection is desired, Proxy.NO_PROXY
    91      *                 If direct connection is desired, Proxy.NO_PROXY
    92      *                 should be specified.
    92      *                 should be specified.
    93      * @return     a {@code URLConnection} object for the {@code URL}.
    93      * @return     a {@code URLConnection} object for the {@code URL}.
    94      * @exception  IOException  if an I/O error occurs while opening the
    94      * @throws     IOException  if an I/O error occurs while opening the
    95      *               connection.
    95      *               connection.
    96      * @exception  IllegalArgumentException if either u or p is null,
    96      * @throws     IllegalArgumentException if either u or p is null,
    97      *               or p has the wrong type.
    97      *               or p has the wrong type.
    98      * @exception  UnsupportedOperationException if the subclass that
    98      * @throws     UnsupportedOperationException if the subclass that
    99      *               implements the protocol doesn't support this method.
    99      *               implements the protocol doesn't support this method.
   100      * @since      1.5
   100      * @since      1.5
   101      */
   101      */
   102     protected URLConnection openConnection(URL u, Proxy p) throws IOException {
   102     protected URLConnection openConnection(URL u, Proxy p) throws IOException {
   103         if (u == null || p == null)
   103         if (u == null || p == null)
   508      * @param   authority the authority part for the URL.
   508      * @param   authority the authority part for the URL.
   509      * @param   userInfo the userInfo part of the URL.
   509      * @param   userInfo the userInfo part of the URL.
   510      * @param   path      the path component of the URL.
   510      * @param   path      the path component of the URL.
   511      * @param   query     the query part for the URL.
   511      * @param   query     the query part for the URL.
   512      * @param   ref       the reference.
   512      * @param   ref       the reference.
   513      * @exception       SecurityException       if the protocol handler of the URL is
   513      * @throws          SecurityException       if the protocol handler of the URL is
   514      *                                  different from this one
   514      *                                  different from this one
   515      * @since 1.3
   515      * @since 1.3
   516      */
   516      */
   517     protected void setURL(URL u, String protocol, String host, int port,
   517     protected void setURL(URL u, String protocol, String host, int port,
   518                              String authority, String userInfo, String path,
   518                              String authority, String userInfo, String path,
   537      * @param   protocol  the protocol name. This value is ignored since 1.2.
   537      * @param   protocol  the protocol name. This value is ignored since 1.2.
   538      * @param   host      the remote host value for the URL.
   538      * @param   host      the remote host value for the URL.
   539      * @param   port      the port on the remote machine.
   539      * @param   port      the port on the remote machine.
   540      * @param   file      the file.
   540      * @param   file      the file.
   541      * @param   ref       the reference.
   541      * @param   ref       the reference.
   542      * @exception       SecurityException       if the protocol handler of the URL is
   542      * @throws          SecurityException       if the protocol handler of the URL is
   543      *                                  different from this one
   543      *                                  different from this one
   544      * @deprecated Use setURL(URL, String, String, int, String, String, String,
   544      * @deprecated Use setURL(URL, String, String, int, String, String, String,
   545      *             String);
   545      *             String);
   546      */
   546      */
   547     @Deprecated
   547     @Deprecated