|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javax.mail.URLName
The name of a URL. This class represents a URL name and also provides the basic parsing functionality to parse most internet standard URL schemes.
Note that this class differs from java.net.URL
in that this class just represents the name of a URL, it does
not model the connection to a URL.
| Field Summary | |
(package private) static int |
caseDiff
|
(package private) static BitSet |
dontNeedEncoding
The class contains a utility method for converting a String into a MIME format called
"x-www-form-urlencoded" format. |
protected String |
fullURL
The full version of the URL |
| Constructor Summary | |
URLName(String url)
Construct a URLName from the string. |
|
URLName(String protocol,
String host,
int port,
String file,
String username,
String password)
Creates a URLName object from the specified protocol, host, port number, file, username, and password. |
|
URLName(URL url)
Construct a URLName from a java.net.URL object. |
|
| Method Summary | |
(package private) static void |
|
(package private) static void |
|
(package private) static String |
decode(String s)
Decodes a "x-www-form-urlencoded" to a String. |
(package private) static String |
encode(String s)
Translates a string into x-www-form-urlencoded format. |
boolean |
equals(Object obj)
Compares two URLNames. |
String |
getFile()
Returns the file name of this URLName. |
String |
getHost()
Returns the host of this URLName. |
String |
getPassword()
Returns the password of this URLName. |
int |
getPort()
Returns the port number of this URLName. |
String |
getProtocol()
Returns the protocol of this URLName. |
String |
getRef()
Returns the reference of this URLName. |
URL |
getURL()
Constructs a URL from the URLName. |
String |
getUsername()
Returns the user name of this URLName. |
int |
hashCode()
Compute the hash code for this URLName. |
protected void |
parseString(String url)
Method which does all of the work of parsing the string. |
String |
toString()
Constructs a string representation of this URLName. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String fullURL
static BitSet dontNeedEncoding
String into a MIME format called
"x-www-form-urlencoded" format.
To convert a String, each character is examined in turn:
a' through 'z',
'A' through 'Z', '0'
through '9', and ".", "-",
"*", "_" remain the same.
' is converted into a
plus sign '+'.
%xy", where xy is the two-digit
hexadecimal representation of the lower 8-bits of the character.
static final int caseDiff
| Constructor Detail |
public URLName(String protocol,
String host,
int port,
String file,
String username,
String password)
public URLName(URL url)
public URLName(String url)
| Method Detail |
static void()
public String toString()
toString in class Objectprotected void parseString(String url)
public int getPort()
public String getProtocol()
public String getFile()
public String getRef()
public String getHost()
public String getUsername()
public String getPassword()
public URL getURL()
throws MalformedURLException
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectstatic void()
static String encode(String s)
x-www-form-urlencoded format.s - String to be translated.String.static String decode(String s)
s - the String to decodeString
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||