• Constructor Summary

    Constructors

  • Method Summary

    boolean

    Compares this URL for equality with another object.

    Gets the authority part of this URL.

    Gets the contents of this URL.

    Gets the contents of this URL.

    int

    Gets the default port number of the protocol associated with this URL.

    getFile()

    Gets the file name of this URL.

    getHost()

    Gets the host name of this URL, if applicable.

    getPath()

    Gets the path part of this URL.

    int

    getPort()

    Gets the port number of this URL.

    Gets the protocol name of this URL.

    getQuery()

    Gets the query part of this URL.

    getRef()

    Gets the anchor (also known as the "reference") of this URL.

    Gets the userInfo part of this URL.

    int

    hashCode()

    Creates an integer suitable for hash table indexing.

    Creates a URL from a URI, as if by invoking uri.toURL(), but associating it with the given URLStreamHandler, if allowed.

    Returns a URLConnection instance that represents a connection to the remote object referred to by the URL.

    Same as openConnection(), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxying will ignore the proxy parameter and make a normal connection.

    Opens a connection to this URL and returns an InputStream for reading from that connection.

    boolean

    Compares two URLs, excluding the fragment component.

    static void

    Sets an application's URLStreamHandlerFactory.

    Constructs a string representation of this URL.

    toString()

    Constructs a string representation of this URL.

    toURI()

    Returns a URI equivalent to this URL.

  • Constructor Details

    • URL

    • URL

    • URL

    • URL

    • URL

    • URL

  • Method Details

    • of

    • getQuery

    • getPath

    • getUserInfo

    • getAuthority

    • getPort

    • getDefaultPort

    • getProtocol

    • getHost

    • getFile

    • getRef

    • equals

    • hashCode

    • sameFile

    • toString

    • toExternalForm

    • toURI

    • openConnection

    • openConnection

    • openStream

    • getContent

    • getContent

    • setURLStreamHandlerFactory