org.eclipse.jetty.http

## Class HttpURI

- java.lang.Object
- - org.eclipse.jetty.http.HttpURI

- Direct Known Subclasses:
    EncodedHttpURI

      public class HttpURI
      extends java.lang.Object

  Http URI. Parse a 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:
  - `getScheme()` - http:
  - `getAuthority()` - //name@host:port
  - `getHost()` - host
  - `getPort()` - port
  - `getPath()` - /path/info
  - `getParam()` - param
  - `getQuery()` - query
  - `getFragment()` - fragment

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpURI()`
    `HttpURI(boolean parsePartialAuth)`
    `HttpURI(byte[] raw, int offset, int length)`
    `HttpURI(java.lang.String raw)`
    `HttpURI(java.net.URI uri)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `void` | `decodeQueryTo(MultiMap parameters)`
    `void` | `decodeQueryTo(MultiMap parameters, java.lang.String encoding)`
    `java.lang.String` | `getAuthority()`
    `java.lang.String` | `getCompletePath()`
    `java.lang.String` | `getDecodedPath()`
    `java.lang.String` | `getDecodedPath(java.lang.String encoding)`
    `java.lang.String` | `getFragment()`
    `java.lang.String` | `getHost()`
    `java.lang.String` | `getParam()`
    `java.lang.String` | `getPath()`
    `java.lang.String` | `getPathAndParam()`
    `int` | `getPort()`
    `java.lang.String` | `getQuery()`
    `java.lang.String` | `getQuery(java.lang.String encoding)`
    `java.lang.String` | `getScheme()`
    `boolean` | `hasQuery()`
    `void` | `parse(byte[] raw, int offset, int length)`
    `void` | `parse(java.lang.String raw)`
    `void` | `parseConnect(byte[] raw, int offset, int length)`
    `java.lang.String` | `toString()`
    `void` | `writeTo(Utf8StringBuilder buf)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpURI

          public HttpURI()

    - #### HttpURI

          public HttpURI(boolean parsePartialAuth)

      Parameters:
        `parsePartialAuth` - If True, parse auth without prior scheme, else treat all URIs starting with / as paths

    - #### HttpURI

          public HttpURI(java.lang.String raw)

    - #### HttpURI

          public HttpURI(byte[] raw,
                 int offset,
                 int length)

    - #### HttpURI

          public HttpURI(java.net.URI uri)

  - ### Method Detail

    - #### parse

          public void parse(java.lang.String raw)

    - #### parse

          public void parse(byte[] raw,
                   int offset,
                   int length)

    - #### parseConnect

          public void parseConnect(byte[] raw,
                          int offset,
                          int length)

    - #### getScheme

          public java.lang.String getScheme()

    - #### getAuthority

          public java.lang.String getAuthority()

    - #### getHost

          public java.lang.String getHost()

    - #### getPort

          public int getPort()

    - #### getPath

          public java.lang.String getPath()

    - #### getDecodedPath

          public java.lang.String getDecodedPath()

    - #### getDecodedPath

          public java.lang.String getDecodedPath(java.lang.String encoding)

    - #### getPathAndParam

          public java.lang.String getPathAndParam()

    - #### getCompletePath

          public java.lang.String getCompletePath()

    - #### getParam

          public java.lang.String getParam()

    - #### getQuery

          public java.lang.String getQuery()

    - #### getQuery

          public java.lang.String getQuery(java.lang.String encoding)

    - #### hasQuery

          public boolean hasQuery()

    - #### getFragment

          public java.lang.String getFragment()

    - #### decodeQueryTo

          public void decodeQueryTo(MultiMap parameters)

    - #### decodeQueryTo

          public void decodeQueryTo(MultiMap parameters,
                           java.lang.String encoding)
                             throws java.io.UnsupportedEncodingException

      Throws:
        `java.io.UnsupportedEncodingException`

    - #### clear

          public void clear()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### writeTo

          public void writeTo(Utf8StringBuilder buf)

Copyright © 2013 FuseSource, Corp.. All Rights Reserved.