Class HttpURI


  • @Deprecated
    public class HttpURI
    extends java.lang.Object
    Deprecated.
    This api is not supported anymore. Please do not use it.
    Http URI. Parse an HTTP URI from a string or byte array. Given a URI http://user@host:port/path/info;param?query#fragment this class will split it into the following undecoded optional elements:

    Any parameters will be returned from getPath(), but are excluded from the return value of getDecodedPath(). If there are multiple parameters, the getParam() method returns only the last one.

    • Constructor Summary

      Constructors 
      Constructor Description
      HttpURI()
      Deprecated.
       
      HttpURI​(java.lang.String uri)
      Deprecated.
       
      HttpURI​(java.lang.String scheme, java.lang.String host, int port, java.lang.String pathQuery)
      Deprecated.
       
      HttpURI​(java.lang.String scheme, java.lang.String host, int port, java.lang.String path, java.lang.String param, java.lang.String query, java.lang.String fragment)
      Deprecated.
       
      HttpURI​(java.net.URI uri)
      Deprecated.
       
      HttpURI​(HttpURI uri)
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void clear()
      Deprecated.
       
      static HttpURI createHttpURI​(java.lang.String scheme, java.lang.String host, int port, java.lang.String path, java.lang.String param, java.lang.String query, java.lang.String fragment)
      Deprecated.
      Construct a normalized URI.
      void decodeQueryTo​(MultiMap<java.lang.String> parameters)
      Deprecated.
       
      void decodeQueryTo​(MultiMap<java.lang.String> parameters, java.lang.String encoding)
      Deprecated.
       
      void decodeQueryTo​(MultiMap<java.lang.String> parameters, java.nio.charset.Charset encoding)
      Deprecated.
       
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      java.lang.String getAuthority()
      Deprecated.
       
      java.lang.String getDecodedPath()
      Deprecated.
       
      java.lang.String getFragment()
      Deprecated.
       
      java.lang.String getHost()
      Deprecated.
       
      java.lang.String getParam()
      Deprecated.
       
      java.lang.String getPath()
      Deprecated.
      The parsed Path.
      java.lang.String getPathQuery()
      Deprecated.
       
      int getPort()
      Deprecated.
       
      java.lang.String getQuery()
      Deprecated.
       
      java.lang.String getScheme()
      Deprecated.
       
      java.lang.String getUser()
      Deprecated.
       
      boolean hasAmbiguousParameter()
      Deprecated.
       
      boolean hasAmbiguousSegment()
      Deprecated.
       
      boolean hasAmbiguousSeparator()
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      boolean hasQuery()
      Deprecated.
       
      boolean isAbsolute()
      Deprecated.
       
      boolean isAmbiguous()
      Deprecated.
       
      void parse​(java.lang.String uri)
      Deprecated.
       
      void parse​(java.lang.String uri, int offset, int length)
      Deprecated.
       
      void parseConnect​(java.lang.String uri)
      Deprecated.
      void parseRequestTarget​(java.lang.String method, java.lang.String uri)
      Deprecated.
      Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
      void setAuthority​(java.lang.String host, int port)
      Deprecated.
       
      void setParam​(java.lang.String param)
      Deprecated.
       
      void setPath​(java.lang.String path)
      Deprecated.
       
      void setPathQuery​(java.lang.String pathQuery)
      Deprecated.
       
      void setQuery​(java.lang.String query)
      Deprecated.
       
      void setScheme​(java.lang.String scheme)
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      java.net.URI toURI()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpURI

        public HttpURI()
        Deprecated.
      • HttpURI

        public HttpURI​(java.lang.String scheme,
                       java.lang.String host,
                       int port,
                       java.lang.String path,
                       java.lang.String param,
                       java.lang.String query,
                       java.lang.String fragment)
        Deprecated.
      • HttpURI

        public HttpURI​(HttpURI uri)
        Deprecated.
      • HttpURI

        public HttpURI​(java.lang.String uri)
        Deprecated.
      • HttpURI

        public HttpURI​(java.net.URI uri)
        Deprecated.
      • HttpURI

        public HttpURI​(java.lang.String scheme,
                       java.lang.String host,
                       int port,
                       java.lang.String pathQuery)
        Deprecated.
    • Method Detail

      • createHttpURI

        public static HttpURI createHttpURI​(java.lang.String scheme,
                                            java.lang.String host,
                                            int port,
                                            java.lang.String path,
                                            java.lang.String param,
                                            java.lang.String query,
                                            java.lang.String fragment)
        Deprecated.
        Construct a normalized URI. Port is not set if it is the default port.
        Parameters:
        scheme - the URI scheme
        host - the URI hose
        port - the URI port
        path - the URI path
        param - the URI param
        query - the URI query
        fragment - the URI fragment
        Returns:
        the normalized URI
      • clear

        public void clear()
        Deprecated.
      • parse

        public void parse​(java.lang.String uri)
        Deprecated.
      • parseRequestTarget

        public void parseRequestTarget​(java.lang.String method,
                                       java.lang.String uri)
        Deprecated.
        Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
        Parameters:
        method - the request method
        uri - the request uri
      • parseConnect

        @Deprecated
        public void parseConnect​(java.lang.String uri)
        Deprecated.
      • parse

        public void parse​(java.lang.String uri,
                          int offset,
                          int length)
        Deprecated.
      • hasAmbiguousSegment

        public boolean hasAmbiguousSegment()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous segment like '..;' or '%2e%2e'
      • hasAmbiguousSeparator

        public boolean hasAmbiguousSeparator()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous separator of %2f
      • hasAmbiguousParameter

        public boolean hasAmbiguousParameter()
        Deprecated.
        Returns:
        True if the URI has a possibly ambiguous path parameter like '..;'
      • getScheme

        public java.lang.String getScheme()
        Deprecated.
      • getHost

        public java.lang.String getHost()
        Deprecated.
      • getPort

        public int getPort()
        Deprecated.
      • getPath

        public java.lang.String getPath()
        Deprecated.
        The parsed Path.
        Returns:
        the path as parsed on valid URI. null for invalid URI.
      • getDecodedPath

        public java.lang.String getDecodedPath()
        Deprecated.
        Returns:
        The decoded canonical path.
        See Also:
        URIUtil.canonicalPath(String)
      • getParam

        public java.lang.String getParam()
        Deprecated.
      • setParam

        public void setParam​(java.lang.String param)
        Deprecated.
      • getQuery

        public java.lang.String getQuery()
        Deprecated.
      • hasQuery

        public boolean hasQuery()
        Deprecated.
      • getFragment

        public java.lang.String getFragment()
        Deprecated.
      • decodeQueryTo

        public void decodeQueryTo​(MultiMap<java.lang.String> parameters)
        Deprecated.
      • decodeQueryTo

        public void decodeQueryTo​(MultiMap<java.lang.String> parameters,
                                  java.lang.String encoding)
                           throws java.io.UnsupportedEncodingException
        Deprecated.
        Throws:
        java.io.UnsupportedEncodingException
      • decodeQueryTo

        public void decodeQueryTo​(MultiMap<java.lang.String> parameters,
                                  java.nio.charset.Charset encoding)
                           throws java.io.UnsupportedEncodingException
        Deprecated.
        Throws:
        java.io.UnsupportedEncodingException
      • isAbsolute

        public boolean isAbsolute()
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • setScheme

        public void setScheme​(java.lang.String scheme)
        Deprecated.
      • setAuthority

        public void setAuthority​(java.lang.String host,
                                 int port)
        Deprecated.
        Parameters:
        host - the host
        port - the port
      • setPath

        public void setPath​(java.lang.String path)
        Deprecated.
        Parameters:
        path - the path
      • setPathQuery

        public void setPathQuery​(java.lang.String pathQuery)
        Deprecated.
      • setQuery

        public void setQuery​(java.lang.String query)
        Deprecated.
      • toURI

        public java.net.URI toURI()
                           throws java.net.URISyntaxException
        Deprecated.
        Throws:
        java.net.URISyntaxException
      • getPathQuery

        public java.lang.String getPathQuery()
        Deprecated.
      • getAuthority

        public java.lang.String getAuthority()
        Deprecated.
      • getUser

        public java.lang.String getUser()
        Deprecated.