Package com.thaiopensource.util
Class Uri
java.lang.Object
com.thaiopensource.util.Uri
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static boolean
hasFragmentId
(String uri) Tests whether a valid URI reference has a fragment identifier.static boolean
isAbsolute
(String uri) Tests whether a valid URI reference is absolute.static boolean
Tests whether a string is a valid URI reference.static String
-
Constructor Details
-
Uri
public Uri()
-
-
Method Details
-
isValid
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
-
resolve
-
hasFragmentId
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
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
-