Class Uri


  • public class Uri
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Uri()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeDisallowedChars​(java.lang.String s)  
      static boolean hasFragmentId​(java.lang.String uri)
      Tests whether a valid URI reference has a fragment identifier.
      static boolean isAbsolute​(java.lang.String uri)
      Tests whether a valid URI reference is absolute.
      static boolean isValid​(java.lang.String s)
      Tests whether a string is a valid URI reference.
      static java.lang.String resolve​(java.lang.String base, java.lang.String uriReference)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Uri

        public Uri()
    • Method Detail

      • isValid

        public static boolean isValid​(java.lang.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 java.lang.String escapeDisallowedChars​(java.lang.String s)
      • resolve

        public static java.lang.String resolve​(java.lang.String base,
                                               java.lang.String uriReference)
      • hasFragmentId

        public static boolean hasFragmentId​(java.lang.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​(java.lang.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