YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
org.seamless.util.URIUtil Class Reference
Collaboration diagram for org.seamless.util.URIUtil:
Collaboration graph

Static Public Member Functions

static URI createAbsoluteURI (URI base, String uri) throws IllegalArgumentException
 Guarantees that the returned URI is absolute, no matter what the argument is.
 
static URI createAbsoluteURI (URI base, URI relativeOrNot) throws IllegalArgumentException
 
static URL createAbsoluteURL (URL base, String uri) throws IllegalArgumentException
 
static URL createAbsoluteURL (URL base, URI relativeOrNot) throws IllegalArgumentException
 
static URL createAbsoluteURL (URI base, URI relativeOrNot) throws IllegalArgumentException
 
static URL createAbsoluteURL (InetAddress address, int localStreamPort, URI relativeOrNot) throws IllegalArgumentException
 
static URI createRelativePathURI (URI uri)
 
static URI createRelativeURI (URI base, URI full)
 
static URI createRelativeURI (URL base, URL full) throws IllegalArgumentException
 
static URI createRelativeURI (URI base, URL full) throws IllegalArgumentException
 
static URI createRelativeURI (URL base, URI full) throws IllegalArgumentException
 
static boolean isAbsoluteURI (String s)
 
static void assertRelativeURI (String what, URI uri)
 
static URL toURL (URI uri)
 
static URI toURI (URL url)
 
static String percentEncode (String s)
 
static String percentDecode (String s)
 
static String encodePathSegment (final String pathSegment)
 
static String encodePathParamName (final String pathParamName)
 
static String encodePathParamValue (final String pathParamValue)
 
static String encodeQueryNameOrValue (final String queryNameOrValue)
 
static String encodeFragment (final String fragment)
 
static String encode (BitSet allowedCharacters, String s, String charset)
 

Static Public Attributes

static final 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 final BitSet PATH_SEGMENT
 
static final BitSet PATH_PARAM_NAME
 
static final BitSet PATH_PARAM_VALUE
 
static final BitSet QUERY
 
static final BitSet FRAGMENT
 

Detailed Description

Author
Christian Bauer

Member Function Documentation

◆ createAbsoluteURI()

static URI org.seamless.util.URIUtil.createAbsoluteURI ( URI  base,
String  uri 
) throws IllegalArgumentException
static

Guarantees that the returned URI is absolute, no matter what the argument is.

Parameters
baseAn absolute base URI, can be null!
uriA string that either represents a relative or an already absolute URI
Returns
An absolute URI
Exceptions
IllegalArgumentExceptionIf the base URI is null and the given URI string is not absolute

Referenced by org.seamless.util.URIUtil.createAbsoluteURI().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ALLOWED

final BitSet org.seamless.util.URIUtil.ALLOWED
static
Initial value:
= new BitSet() {{
int i;
for (i = 'a'; i <= 'z'; i++) {
set(i);
}
for (i = 'A'; i <= 'Z'; i++) {
set(i);
}
for (i = '0'; i <= '9'; i++) {
set(i);
}
set('!');
set('$');
set('&');
set('\'');
set('(');
set(')');
set('*');
set('+');
set(',');
set(';');
set('=');
set('-');
set('.');
set('_');
set('~');
set(':');
set('@');
}}

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.

◆ FRAGMENT

final BitSet org.seamless.util.URIUtil.FRAGMENT
static
Initial value:
= new BitSet() {{
or(ALLOWED);
set('/');
set('?');
}}
static final BitSet ALLOWED
Implementation of path/query/fragment encoding as explained here: http://www.lunatech-research....
Definition URIUtil.java:207

◆ PATH_PARAM_NAME

final BitSet org.seamless.util.URIUtil.PATH_PARAM_NAME
static
Initial value:
= new BitSet() {{
or(ALLOWED);
clear(';');
clear('=');
}}

◆ PATH_PARAM_VALUE

final BitSet org.seamless.util.URIUtil.PATH_PARAM_VALUE
static
Initial value:
= new BitSet() {{
or(ALLOWED);
clear(';');
}}

◆ PATH_SEGMENT

final BitSet org.seamless.util.URIUtil.PATH_SEGMENT
static
Initial value:
= new BitSet() {{
or(ALLOWED);
clear(';');
}}

◆ QUERY

final BitSet org.seamless.util.URIUtil.QUERY
static
Initial value:
= new BitSet() {{
or(ALLOWED);
set('/');
set('?');
clear('=');
clear('&');
clear('+');
}}

The documentation for this class was generated from the following file: