public class HttpURL extends URI
URI.DefaultCharsetChanged, URI.LocaleToCharsetMap
Modifier and Type | Field and Description |
---|---|
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.
|
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, control, delims, disallowed_opaque_part, disallowed_rel_path, space, unwise, within_userinfo
Constructor and Description |
---|
HttpURL(char[] escaped)
Construct a HTTP URL as an escaped form of a character array.
|
HttpURL(char[] escaped,
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,
String relative)
Construct a HTTP URL with a given relative URL string.
|
HttpURL(String original)
Construct a HTTP URL from a given string.
|
HttpURL(String host,
int port,
String path)
Construct a HTTP URL from given components.
|
HttpURL(String host,
int port,
String path,
String query)
Construct a HTTP URL from given components.
|
HttpURL(String original,
String charset)
Construct a HTTP URL from a given string with the given charset to do
escape encoding.
|
HttpURL(String userinfo,
String host,
int port,
String path)
Construct a HTTP URL from given components.
|
HttpURL(String userinfo,
String host,
int port,
String path,
String query)
Construct a HTTP URL from given components.
|
HttpURL(String userinfo,
String host,
int port,
String path,
String query,
String fragment)
Construct a HTTP URL from given components.
|
HttpURL(String user,
String password,
String host)
Construct a HTTP URL from given components.
|
HttpURL(String user,
String password,
String host,
int port)
Construct a HTTP URL from given components.
|
HttpURL(String user,
String password,
String host,
int port,
String path)
Construct a HTTP URL from given components.
|
HttpURL(String user,
String password,
String host,
int port,
String path,
String query)
Construct a HTTP URL from given components.
|
HttpURL(String user,
String password,
String host,
int port,
String path,
String query,
String fragment)
Construct a HTTP URL from given components.
|
HttpURL(String host,
String path,
String query,
String fragment)
Construct a HTTP URL from given components.
|
HttpURL(String userinfo,
String host,
String path,
String query,
String fragment)
Construct a HTTP URL from given components.
|
Modifier and Type | Method and Description |
---|---|
String |
getEscapedPassword()
Get the escaped password.
|
String |
getEscapedUser()
Get the escaped user
|
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.
|
String |
getScheme()
Get the scheme.
|
String |
getUser()
Get the user.
|
void |
setEscapedPassword(String escapedPassword)
Set the escaped password string.
|
void |
setEscapedUser(String escapedUser)
Set the escaped user string.
|
void |
setEscapedUserinfo(String escapedUser,
String escapedPassword)
Set the raw-escaped user and password.
|
void |
setPassword(String password)
Set the password string.
|
void |
setQuery(String[] queryName,
String[] queryValue)
Set the query as the name and value pairs.
|
void |
setQuery(String queryName,
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(String user)
Set the user string.
|
void |
setUserinfo(String user,
String password)
Set the user and password.
|
clone, compareTo, 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, getRawFragment, getRawHost, getRawName, getRawPathQuery, getRawQuery, getRawURI, getRawURIReference, getRawUserinfo, getURI, getURIReference, getUserinfo, hasAuthority, hasFragment, hashCode, hasQuery, hasUserinfo, isAbsoluteURI, isAbsPath, isHierPart, isHostname, isIPv4address, isIPv6reference, isNetPath, isOpaquePart, isRegName, isRelativeURI, isRelPath, isServer, normalize, setDefaultDocumentCharset, setDefaultProtocolCharset, setEscapedAuthority, setEscapedFragment, setEscapedPath, setEscapedQuery, setFragment, setPath, setQuery, setRawAuthority, setRawFragment, setRawPath, setRawQuery, toString
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.public HttpURL(char[] escaped, String charset) throws URIException, NullPointerException
escaped
- the HTTP URL character sequencecharset
- the charset string to do escape encodingURIException
- If checkValid()
failsNullPointerException
- if escaped
is null
URI.getProtocolCharset()
public HttpURL(char[] escaped) throws URIException, NullPointerException
escaped
- the HTTP URL character sequenceURIException
- If checkValid()
failsNullPointerException
- if escaped
is null
URI.getDefaultProtocolCharset()
public HttpURL(String original, String charset) throws URIException
original
- the HTTP URL stringcharset
- the charset string to do escape encodingURIException
- If checkValid()
failsURI.getProtocolCharset()
public HttpURL(String original) throws URIException
original
- the HTTP URL stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(String host, int port, String path) throws URIException
host
- the host stringport
- the port numberpath
- the path stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(String host, int port, String path, String query) throws URIException
host
- the host stringport
- the port numberpath
- the path stringquery
- the query stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(String user, String password, String host) throws URIException
user
- the user namepassword
- his or her passwordhost
- the host stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(String user, String password, 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(String user, String password, String host, int port, 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(String user, String password, String host, int port, String path, 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(String host, String path, String query, String fragment) throws URIException
host
- the host stringpath
- the path stringquery
- the query stringfragment
- the fragment stringURIException
- If checkValid()
failsURI.getDefaultProtocolCharset()
public HttpURL(String userinfo, String host, String path, String query, 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(String userinfo, String host, int port, 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(String userinfo, String host, int port, String path, 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(String userinfo, String host, int port, String path, String query, 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(String user, String password, String host, int port, String path, String query, 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, 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()
failspublic char[] getRawScheme()
getRawScheme
in class URI
public 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(String escapedUser, String escapedPassword) throws URIException, NullPointerException
escapedUser
- the escaped userescapedPassword
- the escaped password; could be nullURIException
- escaped user not valid or user required; escaped
password not valid or username missedNullPointerException
- null userpublic void setUserinfo(String user, String password) throws URIException, NullPointerException
user
- the userpassword
- the password; could be nullURIException
- encoding error or username missedNullPointerException
- null userpublic void setRawUser(char[] escapedUser) throws URIException
escapedUser
- the raw-escaped userURIException
- escaped user not valid or user requiredpublic void setEscapedUser(String escapedUser) throws URIException, NullPointerException
escapedUser
- the escaped user stringURIException
- escaped user not validNullPointerException
- null userpublic void setUser(String user) throws URIException, NullPointerException
user
- the user stringURIException
- user encoding errorNullPointerException
- null userpublic char[] getRawUser()
public String getEscapedUser()
public 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(String escapedPassword) throws URIException
escapedPassword
- the escaped password string; could be nullURIException
- escaped password not valid or username missedpublic void setPassword(String password) throws URIException
password
- the password string; could be nullURIException
- encoding error or username missedpublic char[] getRawPassword()
public String getEscapedPassword()
public 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(String queryName, String queryValue) throws URIException, NullPointerException
queryName
- the query string.queryValue
- the query string.URIException
- incomplete trailing escape pattern
Or unsupported character encodingNullPointerException
- null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
public void setQuery(String[] queryName, String[] queryValue) throws URIException, 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 sizeNullPointerException
- null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
Copyright © 2010 - 2020 Adobe. All Rights Reserved