public class HttpURI extends Object
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:portgetHost()
- hostgetPort()
- portgetPath()
- /path/infogetParam()
- paramgetQuery()
- querygetFragment()
- fragmentConstructor and Description |
---|
HttpURI() |
HttpURI(boolean parsePartialAuth) |
HttpURI(byte[] raw,
int offset,
int length) |
HttpURI(String raw) |
HttpURI(URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
decodeQueryTo(MultiMap parameters) |
void |
decodeQueryTo(MultiMap parameters,
String encoding) |
String |
getAuthority() |
String |
getCompletePath() |
String |
getDecodedPath() |
String |
getDecodedPath(String encoding) |
String |
getFragment() |
String |
getHost() |
String |
getParam() |
String |
getPath() |
String |
getPathAndParam() |
int |
getPort() |
String |
getQuery() |
String |
getQuery(String encoding) |
String |
getScheme() |
boolean |
hasQuery() |
void |
parse(byte[] raw,
int offset,
int length) |
void |
parse(String raw) |
void |
parseConnect(byte[] raw,
int offset,
int length) |
String |
toString() |
void |
writeTo(Utf8StringBuilder buf) |
public HttpURI()
public HttpURI(boolean parsePartialAuth)
parsePartialAuth
- If True, parse auth without prior scheme, else treat all URIs starting with / as pathspublic HttpURI(String raw)
public HttpURI(byte[] raw, int offset, int length)
public HttpURI(URI uri)
public void parse(String raw)
public void parse(byte[] raw, int offset, int length)
public void parseConnect(byte[] raw, int offset, int length)
public String getScheme()
public String getAuthority()
public String getHost()
public int getPort()
public String getPath()
public String getDecodedPath()
public String getPathAndParam()
public String getCompletePath()
public String getParam()
public String getQuery()
public boolean hasQuery()
public String getFragment()
public void decodeQueryTo(MultiMap parameters)
public void decodeQueryTo(MultiMap parameters, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public void clear()
public void writeTo(Utf8StringBuilder buf)
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.