|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.httpclient.URI
com.microsoft.tfs.core.httpclient.HttpURL
public class HttpURL
The HTTP URL.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.microsoft.tfs.core.httpclient.URI |
---|
URI.DefaultCharsetChanged, URI.LocaleToCharsetMap |
Field Summary | |
---|---|
static int |
_default_port
Deprecated. Use DEFAULT_PORT instead. This one doesn't conform
to the project naming conventions. |
static char[] |
_default_scheme
Deprecated. Use DEFAULT_SCHEME instead. This one doesn't conform
to the project naming conventions. |
static int |
DEFAULT_PORT
Default port for HTTP URL. |
static char[] |
DEFAULT_SCHEME
Default scheme for HTTP URL. |
Constructor Summary | |
---|---|
protected |
HttpURL()
Create an instance as an internal use. |
|
HttpURL(char[] escaped)
Construct a HTTP URL as an escaped form of a character array. |
|
HttpURL(char[] escaped,
java.lang.String charset)
Construct a HTTP URL as an escaped form of a character array with the given charset to do escape encoding. |
|
HttpURL(HttpURL base,
HttpURL relative)
Construct a HTTP URL with a given relative URL. |
|
HttpURL(HttpURL base,
java.lang.String relative)
Construct a HTTP URL with a given relative URL string. |
|
HttpURL(java.lang.String original)
Construct a HTTP URL from a given string. |
|
HttpURL(java.lang.String host,
int port,
java.lang.String path)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String host,
int port,
java.lang.String path,
java.lang.String query)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String original,
java.lang.String charset)
Construct a HTTP URL from a given string with the given charset to do escape encoding. |
|
HttpURL(java.lang.String userinfo,
java.lang.String host,
int port,
java.lang.String path)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String userinfo,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String userinfo,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query,
java.lang.String fragment)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String user,
java.lang.String password,
java.lang.String host)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String user,
java.lang.String password,
java.lang.String host,
int port)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String user,
java.lang.String password,
java.lang.String host,
int port,
java.lang.String path)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String user,
java.lang.String password,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String user,
java.lang.String password,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query,
java.lang.String fragment)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String host,
java.lang.String path,
java.lang.String query,
java.lang.String fragment)
Construct a HTTP URL from given components. |
|
HttpURL(java.lang.String userinfo,
java.lang.String host,
java.lang.String path,
java.lang.String query,
java.lang.String fragment)
Construct a HTTP URL from given components. |
Method Summary | |
---|---|
protected void |
checkValid()
Verify the valid class use for construction. |
java.lang.String |
getEscapedPassword()
Get the escaped password. |
java.lang.String |
getEscapedUser()
Get the escaped user |
java.lang.String |
getPassword()
Get the password. |
int |
getPort()
Get the port number. |
char[] |
getRawAboveHierPath()
Get the level above the this hierarchy level. |
char[] |
getRawCurrentHierPath()
Get the raw-escaped current hierarchy level. |
char[] |
getRawPassword()
Get the raw-escaped password. |
char[] |
getRawPath()
Get the raw escaped path. |
char[] |
getRawScheme()
Get the scheme. |
char[] |
getRawUser()
Get the raw-escaped user. |
java.lang.String |
getScheme()
Get the scheme. |
java.lang.String |
getUser()
Get the user. |
void |
setEscapedPassword(java.lang.String escapedPassword)
Set the escaped password string. |
void |
setEscapedUser(java.lang.String escapedUser)
Set the escaped user string. |
void |
setEscapedUserinfo(java.lang.String escapedUser,
java.lang.String escapedPassword)
Set the raw-escaped user and password. |
void |
setPassword(java.lang.String password)
Set the password string. |
void |
setQuery(java.lang.String[] queryName,
java.lang.String[] queryValue)
Set the query as the name and value pairs. |
void |
setQuery(java.lang.String queryName,
java.lang.String queryValue)
Set the query as the name and value pair. |
void |
setRawPassword(char[] escapedPassword)
Set the raw-escaped password. |
void |
setRawUser(char[] escapedUser)
Set the raw-escaped user. |
void |
setRawUserinfo(char[] escapedUser,
char[] escapedPassword)
Set the raw-escaped user and password. |
protected void |
setURI()
Once it's parsed successfully, set this URI. |
void |
setUser(java.lang.String user)
Set the user string. |
void |
setUserinfo(java.lang.String user,
java.lang.String password)
Set the user and password. |
protected static java.lang.String |
toUserinfo(java.lang.String user,
java.lang.String password)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char[] DEFAULT_SCHEME
@Deprecated public static final char[] _default_scheme
DEFAULT_SCHEME
instead. This one doesn't conform
to the project naming conventions.
public static final int DEFAULT_PORT
80
@Deprecated public static final int _default_port
DEFAULT_PORT
instead. This one doesn't conform
to the project naming conventions.
80
Constructor Detail |
---|
protected HttpURL()
public HttpURL(char[] escaped, java.lang.String charset) throws URIException, java.lang.NullPointerException
escaped
- the HTTP URL character sequencecharset
- the charset string to do escape encodingURI.getProtocolCharset()
URIException
- If checkValid()
fails
java.lang.NullPointerException
- if escaped
is null
public HttpURL(char[] escaped) throws URIException, java.lang.NullPointerException
escaped
- the HTTP URL character sequenceURI.getDefaultProtocolCharset()
URIException
- If checkValid()
fails
java.lang.NullPointerException
- if escaped
is null
public HttpURL(java.lang.String original, java.lang.String charset) throws URIException
original
- the HTTP URL stringcharset
- the charset string to do escape encodingURI.getProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String original) throws URIException
original
- the HTTP URL stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String host, int port, java.lang.String path) throws URIException
host
- the host stringport
- the port numberpath
- the path stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String host, int port, java.lang.String path, java.lang.String query) throws URIException
host
- the host stringport
- the port numberpath
- the path stringquery
- the query stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String user, java.lang.String password, java.lang.String host) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String user, java.lang.String password, java.lang.String host, int port) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String user, java.lang.String password, java.lang.String host, int port, java.lang.String path) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String user, java.lang.String password, java.lang.String host, int port, java.lang.String path, java.lang.String query) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path stringquery
- The query string.URI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String host, java.lang.String path, java.lang.String query, java.lang.String fragment) throws URIException
host
- the host stringpath
- the path stringquery
- the query stringfragment
- the fragment stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String userinfo, java.lang.String host, java.lang.String path, java.lang.String query, java.lang.String fragment) throws URIException
userinfo
format is normally
<username>:<password>
where username and
password must both be URL escaped.
userinfo
- the userinfo string whose parts are URL escapedhost
- the host stringpath
- the path stringquery
- the query stringfragment
- the fragment stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String userinfo, java.lang.String host, int port, java.lang.String path) throws URIException
userinfo
format is normally
<username>:<password>
where username and
password must both be URL escaped.
userinfo
- the userinfo string whose parts are URL escapedhost
- the host stringport
- the port numberpath
- the path stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String userinfo, java.lang.String host, int port, java.lang.String path, java.lang.String query) throws URIException
userinfo
format is normally
<username>:<password>
where username and
password must both be URL escaped.
userinfo
- the userinfo string whose parts are URL escapedhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String userinfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, java.lang.String fragment) throws URIException
userinfo
format is normally
<username>:<password>
where username and
password must both be URL escaped.
userinfo
- the userinfo string whose parts are URL escapedhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringfragment
- the fragment stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(java.lang.String user, java.lang.String password, java.lang.String host, int port, java.lang.String path, java.lang.String query, java.lang.String fragment) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringfragment
- the fragment stringURI.getDefaultProtocolCharset()
URIException
- If checkValid()
failspublic HttpURL(HttpURL base, java.lang.String relative) throws URIException
base
- the base HttpURLrelative
- the relative HTTP URL string
URIException
- If checkValid()
failspublic HttpURL(HttpURL base, HttpURL relative) throws URIException
base
- the base HttpURLrelative
- the relative HttpURL
URIException
- If checkValid()
failsMethod Detail |
---|
protected static java.lang.String toUserinfo(java.lang.String user, java.lang.String password) throws URIException
URIException
public char[] getRawScheme()
getRawScheme
in class URI
public java.lang.String getScheme()
getScheme
in class URI
public int getPort()
getPort
in class URI
public void setRawUserinfo(char[] escapedUser, char[] escapedPassword) throws URIException
escapedUser
- the raw-escaped userescapedPassword
- the raw-escaped password; could be null
URIException
- escaped user not valid or user required; escaped password not
valid or username missedpublic void setEscapedUserinfo(java.lang.String escapedUser, java.lang.String escapedPassword) throws URIException, java.lang.NullPointerException
escapedUser
- the escaped userescapedPassword
- the escaped password; could be null
URIException
- escaped user not valid or user required; escaped password not
valid or username missed
java.lang.NullPointerException
- null userpublic void setUserinfo(java.lang.String user, java.lang.String password) throws URIException, java.lang.NullPointerException
user
- the userpassword
- the password; could be null
URIException
- encoding error or username missed
java.lang.NullPointerException
- null userpublic void setRawUser(char[] escapedUser) throws URIException
escapedUser
- the raw-escaped user
URIException
- escaped user not valid or user requiredpublic void setEscapedUser(java.lang.String escapedUser) throws URIException, java.lang.NullPointerException
escapedUser
- the escaped user string
URIException
- escaped user not valid
java.lang.NullPointerException
- null userpublic void setUser(java.lang.String user) throws URIException, java.lang.NullPointerException
user
- the user string
URIException
- user encoding error
java.lang.NullPointerException
- null userpublic char[] getRawUser()
public java.lang.String getEscapedUser()
public java.lang.String getUser() throws URIException
URIException
- If URI.decode(char[], java.lang.String)
failspublic void setRawPassword(char[] escapedPassword) throws URIException
escapedPassword
- the raw-escaped password; could be null
URIException
- escaped password not valid or username missedpublic void setEscapedPassword(java.lang.String escapedPassword) throws URIException
escapedPassword
- the escaped password string; could be null
URIException
- escaped password not valid or username missedpublic void setPassword(java.lang.String password) throws URIException
password
- the password string; could be null
URIException
- encoding error or username missedpublic char[] getRawPassword()
public java.lang.String getEscapedPassword()
public java.lang.String getPassword() throws URIException
URIException
- If URI.decode(char[],String)
fails.public char[] getRawCurrentHierPath() throws URIException
getRawCurrentHierPath
in class URI
URIException
- If URI.getRawCurrentHierPath(char[])
fails.public char[] getRawAboveHierPath() throws URIException
getRawAboveHierPath
in class URI
URIException
- If URI.getRawCurrentHierPath(char[])
fails.public char[] getRawPath()
getRawPath
in class URI
public void setQuery(java.lang.String queryName, java.lang.String queryValue) throws URIException, java.lang.NullPointerException
queryName
- the query string.queryValue
- the query string.URI.encode(java.lang.String, java.util.BitSet, java.lang.String)
URIException
- incomplete trailing escape pattern Or unsupported character
encoding
java.lang.NullPointerException
- null querypublic void setQuery(java.lang.String[] queryName, java.lang.String[] queryValue) throws URIException, java.lang.NullPointerException
queryName
- the array of the query string.queryValue
- the array of the query string.URI.encode(java.lang.String, java.util.BitSet, java.lang.String)
URIException
- incomplete trailing escape pattern, unsupported character
encoding or wrong array size
java.lang.NullPointerException
- null queryprotected void checkValid() throws URIException
URIException
- the wrong scheme useprotected void setURI()
setURI
in class URI
URI.getRawURI()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |