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(Charset charset) |
HttpURI(String raw) |
HttpURI(URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
decodeQueryTo(MultiMap<String> parameters) |
void |
decodeQueryTo(MultiMap<String> parameters,
Charset encoding) |
void |
decodeQueryTo(MultiMap<String> parameters,
String encoding) |
String |
getAuthority() |
String |
getCompletePath() |
String |
getDecodedPath() |
String |
getDecodedPath(Charset encoding) |
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) |
void |
parseConnect(String raw) |
String |
toString() |
void |
writeTo(Utf8StringBuilder buf) |
public HttpURI()
public HttpURI(Charset charset)
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 parseConnect(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<String> parameters, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public void decodeQueryTo(MultiMap<String> parameters, Charset encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public void clear()
public void writeTo(Utf8StringBuilder buf)
Copyright © 1995-2015 Webtide. All Rights Reserved.