Constructor and Description |
---|
URL() |
Modifier and Type | Method and Description |
---|---|
static URL |
fromPath(Path path) |
static URL |
fromURI(URI uri) |
abstract String |
getFile()
Get the file of the URL.
|
abstract String |
getHost()
Get the host of the URL.
|
abstract int |
getPort()
Get the port of the URL.
|
abstract String |
getScheme()
Get the scheme of the URL.
|
abstract String |
getUserInfo()
Get the user info of the URL.
|
static URL |
newInstance(String scheme,
String host,
int port,
String file) |
abstract void |
setFile(String file)
Set the file of the URL.
|
abstract void |
setHost(String host)
Set the host of the URL.
|
abstract void |
setPort(int port)
Set the port of the URL
|
abstract void |
setScheme(String scheme)
Set the scheme of the URL
|
abstract void |
setUserInfo(String userInfo)
Set the user info of the URL.
|
Path |
toPath() |
@InterfaceAudience.Public @InterfaceStability.Stable public static URL newInstance(String scheme, String host, int port, String file)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getScheme()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setScheme(String scheme)
scheme
- scheme of the URL@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getUserInfo()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setUserInfo(String userInfo)
userInfo
- user info of the URL@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getHost()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setHost(String host)
host
- host of the URL@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getPort()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setPort(int port)
port
- port of the URL@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getFile()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setFile(String file)
file
- file of the URL@InterfaceAudience.Public @InterfaceStability.Stable public Path toPath() throws URISyntaxException
URISyntaxException
Copyright © 2019 Apache Software Foundation. All rights reserved.