Class URISpecification


  • public final class URISpecification
    extends java.lang.Object
    This class contains method to deal with the <uri-specification> datatype from XSL-FO.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static char[] HEX_DIGITS  
      private static java.lang.String PUNCT  
      private static java.lang.String RESERVED  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private URISpecification()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void appendEscape​(java.lang.StringBuffer sb, byte b)  
      static java.lang.String escapeURI​(java.lang.String uri)
      Escapes any illegal URI character in a given URI, for example, it escapes a space to "%20".
      static java.lang.String getURL​(java.lang.String href)
      Get the URL string from a wrapped URL.
      private static boolean isAlpha​(char ch)  
      private static boolean isDigit​(char ch)  
      private static boolean isHexDigit​(char ch)  
      private static boolean isReserved​(char ch)  
      private static boolean isUnreserved​(char ch)  
      • Methods inherited from class java.lang.Object

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

      • HEX_DIGITS

        private static final char[] HEX_DIGITS
    • Constructor Detail

      • URISpecification

        private URISpecification()
    • Method Detail

      • getURL

        public static java.lang.String getURL​(java.lang.String href)
        Get the URL string from a wrapped URL.
        Parameters:
        href - the input wrapped URL
        Returns:
        the raw URL
      • isDigit

        private static boolean isDigit​(char ch)
      • isAlpha

        private static boolean isAlpha​(char ch)
      • isHexDigit

        private static boolean isHexDigit​(char ch)
      • isReserved

        private static boolean isReserved​(char ch)
      • isUnreserved

        private static boolean isUnreserved​(char ch)
      • appendEscape

        private static void appendEscape​(java.lang.StringBuffer sb,
                                         byte b)
      • escapeURI

        public static java.lang.String escapeURI​(java.lang.String uri)
        Escapes any illegal URI character in a given URI, for example, it escapes a space to "%20". Note: This method does not "parse" the URI and therefore does not treat the individual components (user-info, path, query etc.) individually.
        Parameters:
        uri - the URI to inspect
        Returns:
        the escaped URI