Class URIUtils


  • public class URIUtils
    extends java.lang.Object
    Created by sudhansh on 2/19/15.
    • Constructor Summary

      Constructors 
      Constructor Description
      URIUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getAsciiString​(byte[] data)
      Converts the byte array of ASCII characters to a string.
      static java.net.URI getUri​(java.lang.String path, boolean escaped)
      Converts the URI String into a java.net.URI object
      • Methods inherited from class java.lang.Object

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

      • URIUtils

        public URIUtils()
    • Method Detail

      • getUri

        public static java.net.URI getUri​(java.lang.String path,
                                          boolean escaped)
                                   throws java.net.URISyntaxException
        Converts the URI String into a java.net.URI object
        Parameters:
        path - the path to be converted
        escaped - a flag indicating whether the path parameter is escaped or not
        Returns:
        java.net.URI instance for the URI string passed
        Throws:
        java.net.URISyntaxException
      • getAsciiString

        public static java.lang.String getAsciiString​(byte[] data)
        Converts the byte array of ASCII characters to a string. This method is to be used when decoding content of HTTP elements (such as response headers)
        Parameters:
        data - the byte array to be encoded
        Returns:
        The string representation of the byte array