|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.sentinel.uri.GenericURI.Authority
public static class GenericURI.Authority
A class that manages the authority component of a URI.
Field Summary | |
---|---|
static PercentCodex |
HOST_CODEX
An encoder that encodes a non-IPv6 literal host information part of the authority component. |
static PercentCodex |
IPV6_CODEX
An encoder that encodes an IPv6 literal address part of the authority component. |
static PercentCodex |
USER_CODEX
An encoder that encodes the user information part of the authority component. |
Constructor Summary | |
---|---|
GenericURI.Authority()
Construct an empty instance. |
|
GenericURI.Authority(GenericURI.Authority src)
Construct a new deep-copy instance from the information in the passed instance. |
|
GenericURI.Authority(String authority)
Construct an instance based on parsing the passed, raw, encoded authority component. |
|
GenericURI.Authority(String host,
int port)
Construct an instance using the passed host and port as the authority information. |
|
GenericURI.Authority(String user,
String host,
int port)
Construct an instance using the passed user information, host, and port as the authority information. |
Method Summary | |
---|---|
String |
getHost()
Get the host information stored in this instance. |
int |
getPort()
Get the port stored in this instance. |
String |
getRaw()
Get the raw, unparsed, unencoded authority component string used to construct this instance, if any. |
String |
getUserInfo()
Get the user information stored in this instance. |
boolean |
isEmpty()
Return true if this instance is empty. |
protected void |
parse(String authority)
Parse the passed raw string into the user info, host, and port. |
void |
set(String authority)
Set the data from the passed raw, encoded authority component. |
void |
set(String host,
int port)
Set the host and port. |
void |
set(String user,
String host,
int port)
Set the user information, host, and port. |
void |
setHost(String host)
Set the host information. |
void |
setPort(int port)
Set the port number. |
protected void |
setRaw(String rawAuthority)
Set the raw string. |
void |
setUserInfo(String userInfo)
Set the user information string. |
String |
toString()
Output this instance as an encoded authority component of a URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PercentCodex USER_CODEX
public static final PercentCodex HOST_CODEX
public static final PercentCodex IPV6_CODEX
Constructor Detail |
---|
public GenericURI.Authority()
public GenericURI.Authority(String authority)
authority
- The authority component.public GenericURI.Authority(String host, int port)
host
- The host name or address literal.port
- The port number.public GenericURI.Authority(String user, String host, int port)
user
- The user information.host
- The host name or address literal.port
- The port number.public GenericURI.Authority(GenericURI.Authority src)
src
- The instance to copy.Method Detail |
---|
public boolean isEmpty()
public String toString()
toString
in class Object
public void set(String authority)
authority
- The authority component string.public void set(String host, int port)
public void set(String user, String host, int port)
public String getUserInfo()
public void setUserInfo(String userInfo)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getRaw()
protected void setRaw(String rawAuthority)
rawAuthority
- The string to set, or null.protected void parse(String authority)
authority
- The raw string.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |