java.io.Serializable
, java.lang.Cloneable
, java.lang.Comparable
HttpsURL
public class HttpURL extends URI
URI.DefaultCharsetChanged, URI.LocaleToCharsetMap
Modifier and Type | Field | Description |
---|---|---|
static int |
_default_port |
Deprecated.
Use
DEFAULT_PORT instead. |
static char[] |
_default_scheme |
Deprecated.
Use
DEFAULT_SCHEME instead. |
static int |
DEFAULT_PORT |
Default port for HTTP URL.
|
static char[] |
DEFAULT_SCHEME |
Default scheme for HTTP URL.
|
_authority, _fragment, _host, _is_abs_path, _is_hier_part, _is_hostname, _is_IPv4address, _is_IPv6reference, _is_net_path, _is_opaque_part, _is_reg_name, _is_rel_path, _is_server, _opaque, _path, _port, _query, _scheme, _uri, _userinfo, abs_path, absoluteURI, allowed_abs_path, allowed_authority, allowed_fragment, allowed_host, allowed_IPv6reference, allowed_opaque_part, allowed_query, allowed_reg_name, allowed_rel_path, allowed_userinfo, allowed_within_authority, allowed_within_path, allowed_within_query, allowed_within_userinfo, alpha, alphanum, authority, control, defaultDocumentCharset, defaultDocumentCharsetByLocale, defaultDocumentCharsetByPlatform, defaultProtocolCharset, delims, digit, disallowed_opaque_part, disallowed_rel_path, domainlabel, escaped, fragment, hash, hex, hier_part, host, hostname, hostport, IPv4address, IPv6address, IPv6reference, mark, net_path, opaque_part, param, path, path_segments, pchar, percent, port, protocolCharset, query, reg_name, rel_path, rel_segment, relativeURI, reserved, rootPath, scheme, segment, server, space, toplabel, unreserved, unwise, URI_reference, uric, uric_no_slash, userinfo, within_userinfo
Modifier | Constructor | Description |
---|---|---|
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(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.
|
|
HttpURL(HttpURL base,
java.lang.String relative) |
Construct a HTTP URL with a given relative URL string.
|
|
HttpURL(HttpURL base,
HttpURL relative) |
Construct a HTTP URL with a given relative URL.
|
Modifier and Type | Method | Description |
---|---|---|
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) |
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, compareTo, decode, decode, encode, equals, equals, getAboveHierPath, getAuthority, getCurrentHierPath, getDefaultDocumentCharset, getDefaultDocumentCharsetByLocale, getDefaultDocumentCharsetByPlatform, getDefaultProtocolCharset, getEscapedAboveHierPath, getEscapedAuthority, getEscapedCurrentHierPath, getEscapedFragment, getEscapedName, getEscapedPath, getEscapedPathQuery, getEscapedQuery, getEscapedURI, getEscapedURIReference, getEscapedUserinfo, getFragment, getHost, getName, getPath, getPathQuery, getProtocolCharset, getQuery, getRawAuthority, getRawCurrentHierPath, getRawFragment, getRawHost, getRawName, getRawPathQuery, getRawQuery, getRawURI, getRawURIReference, getRawUserinfo, getURI, getURIReference, getUserinfo, hasAuthority, hasFragment, hashCode, hasQuery, hasUserinfo, indexFirstOf, indexFirstOf, indexFirstOf, indexFirstOf, isAbsoluteURI, isAbsPath, isHierPart, isHostname, isIPv4address, isIPv6reference, isNetPath, isOpaquePart, isRegName, isRelativeURI, isRelPath, isServer, normalize, normalize, parseAuthority, parseUriReference, prevalidate, removeFragmentIdentifier, resolvePath, setDefaultDocumentCharset, setDefaultProtocolCharset, setEscapedAuthority, setEscapedFragment, setEscapedPath, setEscapedQuery, setFragment, setPath, setQuery, setRawAuthority, setRawFragment, setRawPath, setRawQuery, toString, validate, validate
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.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 encodingURIException
- If checkValid()
failsjava.lang.NullPointerException
- if escaped
is null
URI.getProtocolCharset()
public HttpURL(char[] escaped) throws URIException, java.lang.NullPointerException
escaped
- the HTTP URL character sequenceURIException
- If checkValid()
failsjava.lang.NullPointerException
- if escaped
is null
URI.getDefaultProtocolCharset()
public HttpURL(java.lang.String original, java.lang.String charset) throws URIException
original
- the HTTP URL stringcharset
- the charset string to do escape encodingURIException
- If checkValid()
failsURI.getProtocolCharset()
public HttpURL(java.lang.String original) throws URIException
original
- the HTTP URL stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 numberURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- 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 stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(HttpURL base, java.lang.String relative) throws URIException
base
- the base HttpURLrelative
- the relative HTTP URL stringURIException
- If checkValid()
failspublic HttpURL(HttpURL base, HttpURL relative) throws URIException
base
- the base HttpURLrelative
- the relative HttpURLURIException
- If checkValid()
failsprotected 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()
public int getPort()
public void setRawUserinfo(char[] escapedUser, char[] escapedPassword) throws URIException
escapedUser
- the raw-escaped userescapedPassword
- the raw-escaped password; could be nullURIException
- 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 nullURIException
- escaped user not valid or user required; escaped
password not valid or username missedjava.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 nullURIException
- encoding error or username missedjava.lang.NullPointerException
- null userpublic void setRawUser(char[] escapedUser) throws URIException
escapedUser
- the raw-escaped userURIException
- escaped user not valid or user requiredpublic void setEscapedUser(java.lang.String escapedUser) throws URIException, java.lang.NullPointerException
escapedUser
- the escaped user stringURIException
- escaped user not validjava.lang.NullPointerException
- null userpublic void setUser(java.lang.String user) throws URIException, java.lang.NullPointerException
user
- the user stringURIException
- user encoding errorjava.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 nullURIException
- escaped password not valid or username missedpublic void setEscapedPassword(java.lang.String escapedPassword) throws URIException
escapedPassword
- the escaped password string; could be nullURIException
- escaped password not valid or username missedpublic void setPassword(java.lang.String password) throws URIException
password
- the password string; could be nullURIException
- 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.URIException
- incomplete trailing escape pattern
Or unsupported character encodingjava.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 sizejava.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 URI
URI.getRawURI()
Copyright (c) 1999-2005 - Apache Software Foundation