public class URIUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static BitSet |
ALLOWED
Implementation of path/query/fragment encoding as explained here:
http://www.lunatech-research.com/archives/2009/02/03/what-every-web-developer-must-know-about-url-encoding
|
static BitSet |
FRAGMENT |
static BitSet |
PATH_PARAM_NAME |
static BitSet |
PATH_PARAM_VALUE |
static BitSet |
PATH_SEGMENT |
static BitSet |
QUERY |
| Constructor and Description |
|---|
URIUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertRelativeURI(String what,
URI uri) |
static URI |
createAbsoluteURI(URI base,
String uri)
Guarantees that the returned URI is absolute, no matter what the argument is.
|
static URI |
createAbsoluteURI(URI base,
URI relativeOrNot) |
static URL |
createAbsoluteURL(InetAddress address,
int localStreamPort,
URI relativeOrNot) |
static URL |
createAbsoluteURL(URI base,
URI relativeOrNot) |
static URL |
createAbsoluteURL(URL base,
String uri) |
static URL |
createAbsoluteURL(URL base,
URI relativeOrNot) |
static URI |
createRelativePathURI(URI uri) |
static URI |
createRelativeURI(URI base,
URI full) |
static URI |
createRelativeURI(URI base,
URL full) |
static URI |
createRelativeURI(URL base,
URI full) |
static URI |
createRelativeURI(URL base,
URL full) |
static String |
encode(BitSet allowedCharacters,
String s,
String charset) |
static String |
encodeFragment(String fragment) |
static String |
encodePathParamName(String pathParamName) |
static String |
encodePathParamValue(String pathParamValue) |
static String |
encodePathSegment(String pathSegment) |
static String |
encodeQueryNameOrValue(String queryNameOrValue) |
static boolean |
isAbsoluteURI(String s) |
static String |
percentDecode(String s) |
static String |
percentEncode(String s) |
static URI |
toURI(URL url) |
static URL |
toURL(URI uri) |
public static final BitSet ALLOWED
public static final BitSet PATH_SEGMENT
public static final BitSet PATH_PARAM_NAME
public static final BitSet PATH_PARAM_VALUE
public static final BitSet QUERY
public static final BitSet FRAGMENT
public static URI createAbsoluteURI(URI base, String uri) throws IllegalArgumentException
base - An absolute base URI, can be null!uri - A string that either represents a relative or an already absolute URIIllegalArgumentException - If the base URI is null and the given URI string is not absolutepublic static URI createAbsoluteURI(URI base, URI relativeOrNot) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URL createAbsoluteURL(URL base, String uri) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URL createAbsoluteURL(URL base, URI relativeOrNot) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URL createAbsoluteURL(URI base, URI relativeOrNot) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URL createAbsoluteURL(InetAddress address, int localStreamPort, URI relativeOrNot) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URI createRelativeURI(URL base, URL full) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URI createRelativeURI(URI base, URL full) throws IllegalArgumentException
IllegalArgumentExceptionpublic static URI createRelativeURI(URL base, URI full) throws IllegalArgumentException
IllegalArgumentExceptionpublic static boolean isAbsoluteURI(String s)
Copyright © 2023 jUPnP.org. All rights reserved.