|
Knopflerfish OSGi 6.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.httpclient.URI
org.apache.commons.httpclient.HttpURL
public class HttpURL
The HTTP URL.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.commons.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
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
public static final int _default_port
DEFAULT_PORT instead. This one doesn't conform
to the project naming conventions.
| 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 encoding
URIException - If checkValid() fails
java.lang.NullPointerException - if escaped is nullURI.getProtocolCharset()
public HttpURL(char[] escaped)
throws URIException,
java.lang.NullPointerException
escaped - the HTTP URL character sequence
URIException - If checkValid() fails
java.lang.NullPointerException - if escaped is nullURI.getDefaultProtocolCharset()
public HttpURL(java.lang.String original,
java.lang.String charset)
throws URIException
original - the HTTP URL stringcharset - the charset string to do escape encoding
URIException - If checkValid() failsURI.getProtocolCharset()
public HttpURL(java.lang.String original)
throws URIException
original - the HTTP URL string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 stringquery - The query string.
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
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 - If checkValid() failsURI.getDefaultProtocolCharset()
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 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
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public 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 string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public 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 string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
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 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
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public 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 string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(HttpURL base,
java.lang.String relative)
throws URIException
base - the base HttpURLrelative - the relative HTTP URL string
URIException - If checkValid() fails
public HttpURL(HttpURL base,
HttpURL relative)
throws URIException
base - the base HttpURLrelative - the relative HttpURL
URIException - If checkValid() fails| Method Detail |
|---|
protected static java.lang.String toUserinfo(java.lang.String user,
java.lang.String password)
throws URIException
URIExceptionpublic char[] getRawScheme()
getRawScheme in class URIpublic java.lang.String getScheme()
getScheme in class URIpublic 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 missed
public 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 user
public 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 user
public void setRawUser(char[] escapedUser)
throws URIException
escapedUser - the raw-escaped user
URIException - escaped user not valid or user required
public 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 user
public 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) fails
public void setRawPassword(char[] escapedPassword)
throws URIException
escapedPassword - the raw-escaped password; could be null
URIException - escaped password not valid or username missed
public void setEscapedPassword(java.lang.String escapedPassword)
throws URIException
escapedPassword - the escaped password string; could be null
URIException - escaped password not valid or username missed
public 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 URIURIException - If URI.getRawCurrentHierPath(char[]) fails.
public char[] getRawAboveHierPath()
throws URIException
getRawAboveHierPath in class URIURIException - 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.
URIException - incomplete trailing escape pattern
Or unsupported character encoding
java.lang.NullPointerException - null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
public 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.
URIException - incomplete trailing escape pattern,
unsupported character encoding or wrong array size
java.lang.NullPointerException - null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
protected void checkValid()
throws URIException
URIException - the wrong scheme useprotected void setURI()
setURI in class URIURI.getRawURI()
|
Knopflerfish OSGi 6.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||