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 changes| Modifier and Type | Class and Description |
|---|---|
class |
URL.HttpURLConnection |
class |
URL.URLConnection |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAuthority() |
int |
getDefaultPort() |
String |
getFile() |
String |
getHost() |
String |
getPath() |
int |
getPort() |
String |
getProtocol() |
String |
getQuery() |
String |
getUserInfo() |
int |
hashCode() |
URL.URLConnection |
openConnection() |
InputStream |
openStream() |
boolean |
sameFile(URL u) |
String |
toExternalForm() |
String |
toString() |
URI |
toURI() |
public URL(String url) throws URISyntaxException
URISyntaxExceptionpublic 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 sameFile(URL u)
public String toExternalForm()
public URI toURI() throws URISyntaxException
URISyntaxExceptionpublic URL.URLConnection openConnection() throws IOException
IOExceptionpublic final InputStream openStream() throws IOException
IOExceptionCopyright © 2023. All rights reserved.