public class URL extends Object
URL
making it almost into a "drop in" replacement.
It is placed in a different package because it is incompatible to URL
by definition. It is useful
in getting some simple code to work without too many changesModifier and Type | Class and Description |
---|---|
class |
URL.HttpURLConnection |
class |
URL.URLConnection |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
String |
getAuthority() |
int |
getDefaultPort() |
String |
getFile() |
String |
getHost() |
String |
getPath() |
int |
getPort() |
String |
getProtocol() |
String |
getQuery() |
String |
getUserInfo() |
int |
hashCode()
Returns a hash code value for the object.
|
URL.URLConnection |
openConnection() |
InputStream |
openStream() |
boolean |
sameFile(URL u) |
String |
toExternalForm() |
String |
toString()
Returns a string representation of the object.
|
URI |
toURI() |
public URL(String url) throws URISyntaxException
URISyntaxException
public String getQuery()
public String getPath()
public String getUserInfo()
public String getAuthority()
public int getPort()
public int getDefaultPort()
public String getProtocol()
public String getHost()
public String getFile()
public boolean equals(Object o)
Object
public int hashCode()
Object
public boolean sameFile(URL u)
public String toString()
Object
public String toExternalForm()
public URI toURI() throws URISyntaxException
URISyntaxException
public URL.URLConnection openConnection() throws IOException
IOException
public final InputStream openStream() throws IOException
IOException