public class UriUtils extends Object
Modifier and Type | Method and Description |
---|---|
static URI |
addUserInfo(URI uri,
String userInfo)
Constructs new uri from old, updating userInfo.
|
static URI |
ensureUri(String path)
SDH 01/06/09: In following with the revelations of isUri, this method
also needs to be check out.
|
static File |
getFile(URL url)
For local file conversion.
|
static String |
getKey(URI uri) |
static URI |
getUri(String s,
String h,
int p,
String path)
Constructs the uri string and creates a URI object.
|
static URI |
getUri(String s,
String u,
String h,
int p,
String path)
Constructs the uri string and creates a URI object.
|
static URI |
getUri(String s,
URI old)
Constructs new uri from old, swapping out the old scheme for the new.
|
static URI |
getUri(URI uri,
String path)
Constructs new uri from old, updating path.
|
static URI |
getUri(URL url)
Constructs the uri from the url using protocol, host, port and path.
|
static boolean |
haveSameConnection(URI uri0,
URI uri1) |
static boolean |
isHierarchicalUri(String path)
SDH 01/06/09: This method shouldn't be used.
|
static boolean |
isResource(URI uri) |
static URI |
removeUserInfo(URI uri)
Constructs new uri from old, removing the userInfo.
|
public static URI addUserInfo(URI uri, String userInfo) throws URISyntaxException
uri
- from which to construct updated uri.userInfo
- new user information.URISyntaxException
public static URI ensureUri(String path) throws URISyntaxException
path
- which may or may not be a URIURISyntaxException
- ALR 01/07/09: The fix of isUri allows us to remove the
deprecation here.public static File getFile(URL url)
url
- to convertpublic static URI getUri(String s, String h, int p, String path) throws URISyntaxException
s
- scheme.h
- host name.p
- port number.path
- of resource.URISyntaxException
public static URI getUri(String s, String u, String h, int p, String path) throws URISyntaxException
s
- scheme.u
- user info.h
- host name.p
- port number.path
- of resource.URISyntaxException
public static URI getUri(String s, URI old) throws URISyntaxException
s
- scheme.old
- URI object.URISyntaxException
public static URI getUri(URI uri, String path) throws URISyntaxException
uri
- from which to construct updated uri.path
- new URI-consistent path.URISyntaxException
public static URI getUri(URL url) throws URISyntaxException
url
- to convert.URISyntaxException
public static boolean isHierarchicalUri(String path)
public static boolean isResource(URI uri)
public static URI removeUserInfo(URI uri) throws URISyntaxException
uri
- from which to construct updated uri.URISyntaxException
Copyright © 2019. All rights reserved.