All Implemented Interfaces:
Serializable

  • 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.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • 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