The HTTP URL.
HttpURL
protected HttpURL()
Create an instance as an internal use.
HttpURL
public HttpURL(String original)
throws URIException
Construct a HTTP URL from a given string.
original
- the HTTP URL string
HttpURL
public HttpURL(String original,
String charset)
throws URIException
Construct a HTTP URL from a given string with the given charset to do
escape encoding.
original
- the HTTP URL stringcharset
- the charset string to do escape encoding
HttpURL
public HttpURL(String user,
String password,
String host)
throws URIException
Construct a HTTP URL from given components.
user
- the user namepassword
- his or her passwordhost
- the host string
HttpURL
public HttpURL(String host,
String path,
String query,
String fragment)
throws URIException
Construct a HTTP URL from given components.
host
- the host stringpath
- the path stringquery
- the query stringfragment
- the fragment string
HttpURL
public HttpURL(String userinfo,
String host,
String path,
String query,
String fragment)
throws URIException
Construct a HTTP URL from given components.
Note: The 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 string
HttpURL
public HttpURL(String user,
String password,
String host,
int port)
throws URIException
Construct a HTTP URL from given components.
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port number
HttpURL
public HttpURL(String user,
String password,
String host,
int port,
String path)
throws URIException
Construct a HTTP URL from given components.
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path string
HttpURL
public HttpURL(String user,
String password,
String host,
int port,
String path,
String query)
throws URIException
Construct a HTTP URL from given components.
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path stringquery
- The query string.
HttpURL
public HttpURL(String user,
String password,
String host,
int port,
String path,
String query,
String fragment)
throws URIException
Construct a HTTP URL from given components.
user
- the user namepassword
- his or her passwordhost
- the host stringport
- the port numberpath
- the path stringquery
- the query stringfragment
- the fragment string
HttpURL
public HttpURL(String userinfo,
String host,
int port,
String path)
throws URIException
Construct a HTTP URL from given components.
Note: The 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 string
HttpURL
public HttpURL(String userinfo,
String host,
int port,
String path,
String query)
throws URIException
Construct a HTTP URL from given components.
Note: The 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 string
HttpURL
public HttpURL(String userinfo,
String host,
int port,
String path,
String query,
String fragment)
throws URIException
Construct a HTTP URL from given components.
Note: The 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 string
HttpURL
public HttpURL(String host,
int port,
String path)
throws URIException
Construct a HTTP URL from given components.
host
- the host stringport
- the port numberpath
- the path string
HttpURL
public HttpURL(String host,
int port,
String path,
String query)
throws URIException
Construct a HTTP URL from given components.
host
- the host stringport
- the port numberpath
- the path stringquery
- the query string
HttpURL
public HttpURL(char[] escaped)
throws URIException,
NullPointerException
Construct a HTTP URL as an escaped form of a character array.
escaped
- the HTTP URL character sequence
HttpURL
public HttpURL(char[] escaped,
String charset)
throws URIException,
NullPointerException
Construct a HTTP URL as an escaped form of a character array with the
given charset to do escape encoding.
escaped
- the HTTP URL character sequencecharset
- the charset string to do escape encoding
HttpURL
public HttpURL(HttpURL base,
String relative)
throws URIException
Construct a HTTP URL with a given relative URL string.
base
- the base HttpURLrelative
- the relative HTTP URL string
HttpURL
public HttpURL(HttpURL base,
HttpURL relative)
throws URIException
Construct a HTTP URL with a given relative URL.
base
- the base HttpURLrelative
- the relative HttpURL
checkValid
protected void checkValid()
throws URIException
Verify the valid class use for construction.
getEscapedPassword
public String getEscapedPassword()
Get the escaped password.
getEscapedUser
public String getEscapedUser()
Get the escaped user
getPassword
public String getPassword()
throws URIException
Get the password.
getPort
public int getPort()
Get the port number.
- getPort in interface URI
getRawAboveHierPath
public char[] getRawAboveHierPath()
throws URIException
Get the level above the this hierarchy level.
- getRawAboveHierPath in interface URI
- the raw above hierarchy level
getRawCurrentHierPath
public char[] getRawCurrentHierPath()
throws URIException
Get the raw-escaped current hierarchy level.
- getRawCurrentHierPath in interface URI
- the raw-escaped current hierarchy level
getRawPassword
public char[] getRawPassword()
Get the raw-escaped password.
getRawPath
public char[] getRawPath()
Get the raw escaped path.
- getRawPath in interface URI
- the path '/' if empty or undefined
getRawScheme
public char[] getRawScheme()
Get the scheme. You can get the scheme explicitly.
- getRawScheme in interface URI
getRawUser
public char[] getRawUser()
Get the raw-escaped user.
getScheme
public String getScheme()
Get the scheme. You can get the scheme explicitly.
- getScheme in interface URI
- the scheme null if empty or undefined
getUser
public String getUser()
throws URIException
Get the user.
setEscapedPassword
public void setEscapedPassword(String escapedPassword)
throws URIException
Set the escaped password string.
escapedPassword
- the escaped password string; could be null
URIException
- escaped password not valid or username missed
setEscapedUser
public void setEscapedUser(String escapedUser)
throws URIException,
NullPointerException
Set the escaped user string.
escapedUser
- the escaped user string
setEscapedUserinfo
public void setEscapedUserinfo(String escapedUser,
String escapedPassword)
throws URIException,
NullPointerException
Set the raw-escaped user and password.
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
setPassword
public void setPassword(String password)
throws URIException
Set the password string.
password
- the password string; could be null
setQuery
public void setQuery(String queryName,
String queryValue)
throws URIException,
NullPointerException
Set the query as the name and value pair.
queryName
- the query string.queryValue
- the query string.
URIException
- incomplete trailing escape pattern
Or unsupported character encoding
setQuery
public void setQuery(String[] queryName,
String[] queryValue)
throws URIException,
NullPointerException
Set the query as the name and value pairs.
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
setRawPassword
public void setRawPassword(char[] escapedPassword)
throws URIException
Set the raw-escaped password.
escapedPassword
- the raw-escaped password; could be null
URIException
- escaped password not valid or username missed
setRawUser
public void setRawUser(char[] escapedUser)
throws URIException
Set the raw-escaped user.
escapedUser
- the raw-escaped user
setRawUserinfo
public void setRawUserinfo(char[] escapedUser,
char[] escapedPassword)
throws URIException
Set the raw-escaped user and password.
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 missed
setUser
public void setUser(String user)
throws URIException,
NullPointerException
Set the user string.
setUserinfo
public void setUserinfo(String user,
String password)
throws URIException,
NullPointerException
Set the user and password.
user
- the userpassword
- the password; could be null
toUserinfo
protected static String toUserinfo(String user,
String password)
throws URIException