@Public
@Stable
public abstract class URL
extends java.lang.Object
URL represents a serializable URL.
| Constructor | Description |
|---|---|
URL() |
| Modifier and Type | Method | Description |
|---|---|---|
static URL |
fromPath(org.apache.hadoop.fs.Path path) |
|
static URL |
fromPath(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
|
static URL |
fromURI(java.net.URI uri) |
|
static URL |
fromURI(java.net.URI uri,
org.apache.hadoop.conf.Configuration conf) |
|
abstract java.lang.String |
getFile() |
Get the file of the URL.
|
abstract java.lang.String |
getHost() |
Get the host of the URL.
|
abstract int |
getPort() |
Get the port of the URL.
|
abstract java.lang.String |
getScheme() |
Get the scheme of the URL.
|
abstract java.lang.String |
getUserInfo() |
Get the user info of the URL.
|
static URL |
newInstance(java.lang.String scheme,
java.lang.String host,
int port,
java.lang.String file) |
|
abstract void |
setFile(java.lang.String file) |
Set the file of the URL.
|
abstract void |
setHost(java.lang.String host) |
Set the host of the URL.
|
abstract void |
setPort(int port) |
Set the port of the URL
|
abstract void |
setScheme(java.lang.String scheme) |
Set the scheme of the URL
|
abstract void |
setUserInfo(java.lang.String userInfo) |
Set the user info of the URL.
|
org.apache.hadoop.fs.Path |
toPath() |
@Public @Stable public static URL newInstance(java.lang.String scheme, java.lang.String host, int port, java.lang.String file)
@Public @Stable public abstract java.lang.String getScheme()
@Public @Stable public abstract void setScheme(java.lang.String scheme)
scheme - scheme of the URL@Public @Stable public abstract java.lang.String getUserInfo()
@Public @Stable public abstract void setUserInfo(java.lang.String userInfo)
userInfo - user info of the URL@Public @Stable public abstract java.lang.String getHost()
@Public @Stable public abstract void setHost(java.lang.String host)
host - host of the URL@Public @Stable public abstract int getPort()
@Public @Stable public abstract void setPort(int port)
port - port of the URL@Public @Stable public abstract java.lang.String getFile()
@Public @Stable public abstract void setFile(java.lang.String file)
file - file of the URL@Public
@Stable
public org.apache.hadoop.fs.Path toPath()
throws java.net.URISyntaxException
java.net.URISyntaxException@Private @VisibleForTesting public static URL fromURI(java.net.URI uri, org.apache.hadoop.conf.Configuration conf)
@Public @Stable public static URL fromURI(java.net.URI uri)
@Private @VisibleForTesting public static URL fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
@Public @Stable public static URL fromPath(org.apache.hadoop.fs.Path path)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.