|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.URI | +--org.apache.commons.httpclient.HttpURL
The HTTP URL.
Nested Class Summary |
Nested classes inherited from class org.apache.commons.httpclient.URI |
URI.CharsetChanged, URI.LocaleToCharsetMap |
Field Summary | |
static int |
_default_port
Default port for HTTP URL. |
static char[] |
_default_scheme
Default scheme for HTTP URL. |
Constructor Summary | |
protected |
HttpURL()
|
|
HttpURL(char[] escaped)
Construct a HTTP URL as an escaped form of a character array. |
|
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 host,
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)
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 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. |
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. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final char[] _default_scheme
public static final int _default_port
Constructor Detail |
protected HttpURL()
public HttpURL(char[] escaped) throws URIException
escaped
- the HTTP URL character sequence
URIException
java.lang.NullPointerException
- if escaped
is null
public HttpURL(java.lang.String original) throws URIException
original
- the HTTP URL string
URIException
public HttpURL(java.lang.String host, java.lang.String path) throws URIException
host
- the host stringpath
- the path string
URIException
public HttpURL(java.lang.String host, int port, java.lang.String path) throws URIException
host
- the host stringport
- the port numberpath
- the path string
URIException
public 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 string
URIException
public 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 string
URIException
public 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 number
URIException
public 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 string
URIException
public 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 string
URIException
public 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 string
URIException
public HttpURL(java.lang.String userinfo, java.lang.String host, java.lang.String path, java.lang.String query, java.lang.String fragment) throws URIException
userinfo
- the userinfo stringhost
- the host stringpath
- the path stringquery
- the query stringfragment
- the fragment string
URIException
public HttpURL(java.lang.String userinfo, java.lang.String host, int port, java.lang.String path) throws URIException
userinfo
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path string
URIException
public HttpURL(java.lang.String userinfo, java.lang.String host, int port, java.lang.String path, java.lang.String query) throws URIException
userinfo
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path stringquery
- the query string
URIException
public 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
- the userinfo stringhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringfragment
- the fragment string
URIException
public HttpURL(HttpURL base, java.lang.String relative) throws URIException
base
- the base HttpURLrelative
- the relative HTTP URL string
URIException
public HttpURL(HttpURL base, HttpURL relative) throws URIException
base
- the base HttpURLrelative
- the relative HttpURL
URIException
Method Detail |
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
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
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
URIException
- escaped user not valid or user requiredpublic void setEscapedUser(java.lang.String escapedUser) throws URIException
escapedUser
- the escaped user string
URIException
- escaped user not valid
java.lang.NullPointerException
- null userpublic void setUser(java.lang.String user) throws URIException
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
public void setRawPassword(char[] escapedPassword) throws URIException
URIException
- escaped password not valid or username missedpublic void setEscapedPassword(java.lang.String escapedPassword) throws URIException
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
public char[] getRawCurrentHierPath() throws URIException
getRawCurrentHierPath
in class URI
URIException
- no hierarchy levelpublic char[] getRawAboveHierPath() throws URIException
getRawAboveHierPath
in class URI
URIException
public char[] getRawPath()
getRawPath
in class URI
public void setQuery(java.lang.String queryName, java.lang.String queryValue) throws URIException
queryName
- the query string.queryValue
- the query string.
URIException
- incomplete trailing escape pattern
Or unsupported character encoding
java.lang.NullPointerException
- null queryURI.encode(java.lang.String, java.util.BitSet)
public void setQuery(java.lang.String[] queryName, java.lang.String[] queryValue) throws URIException
queryName
- the array of the query string.queryValue
- the array of the query string.
URIException
- incomplete trailing escape pattern,
unsupported character encoding or wrong array size
java.lang.NullPointerException
- null queryURI.encode(java.lang.String, java.util.BitSet)
protected void checkValid() throws URIException
URIException
- the wrong scheme use
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |