com.thaiopensource.util
Class Uri
java.lang.Object
com.thaiopensource.util.Uri
public class Uri
- extends Object
Constructor Summary |
Uri()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Uri
public Uri()
isValid
public static boolean isValid(String s)
- Tests whether a string is a valid URI reference.
- Parameters:
s
- the String to be tested
- Returns:
- true is s is a valid URI reference, false otherwise
escapeDisallowedChars
public static String escapeDisallowedChars(String s)
resolve
public static String resolve(String base,
String uriReference)
hasFragmentId
public static boolean hasFragmentId(String uri)
- Tests whether a valid URI reference has a fragment identifier. It is allowed to pass an invalid URI reference,
but the result is not defined.
- Parameters:
uri
- the URI reference to be tested, must not be null
- Returns:
- true if the URI reference has a fragment identifier, false otherwise
isAbsolute
public static boolean isAbsolute(String uri)
- Tests whether a valid URI reference is absolute. It is allowed to pass an invalid URI reference,
but the result is not defined. It is also allowed to pass a valid URI with leading
and trailing whitespace.
- Parameters:
uri
- the URI to be tested, must not be null
- Returns:
- true if the URI reference is absolute, false otherwise