URL (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable
-
Constructor Summary
Constructors
-
Method Summary
booleanCompares 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.
intGets 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.intgetPort()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.inthashCode()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 givenURLStreamHandler, if allowed.Returns a
URLConnectioninstance that represents a connection to the remote object referred to by theURL.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
URLand returns anInputStreamfor reading from that connection.booleanCompares two URLs, excluding the fragment component.
static voidSets an application's
URLStreamHandlerFactory.Constructs a string representation of this
URL.toString()Constructs a string representation of this
URL.toURI()Returns a
URIequivalent to this URL.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(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 voidwait(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
-