|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.util.URLParser
public class URLParser
This class enables URL parsing for non-registered protocols.
By default, many Java implementations would throw exception if one tries to
run the following code:
URL url = new URL("https://www.jscape.com/");
In order to use the above code, a protocol handler must be installed
for protocol 'https'. This is a procedure that is normally not allowed to client
applet or application due to security restrictions.
Hence, this class provides the code necessary to parse the common URL representations
regardless of the protocols installed on client computer. It is primarity oriented
towards http-like URL's.
URL
Field Summary | |
---|---|
static java.util.Properties |
protocols
|
Constructor Summary | |
---|---|
URLParser(java.lang.String url)
Create URLParser and parse url fields. |
Method Summary | |
---|---|
java.lang.String |
getAuthority()
Get the authentication information for this URL. |
java.lang.String |
getFile()
Get the file name for this URL. |
java.lang.String |
getHost()
Get the host name for this URL. |
java.lang.String |
getPath()
Get the path for this URL. |
int |
getPort()
Get the port number for this URL. |
java.lang.String |
getProtocol()
Get the protocol for this URL. |
java.lang.String |
getQuery()
Get the query part of this URL. |
java.lang.String |
getReference()
Get the reference part of this URL. |
java.lang.String |
getURLString()
Gets the original URL string. |
void |
parse(java.lang.String url)
Parse url fields. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.Properties protocols
Constructor Detail |
---|
public URLParser(java.lang.String url) throws java.net.MalformedURLException
url
- String representation of the URL to parse
java.net.MalformedURLException
- if the URL could not be parsedMethod Detail |
---|
public void parse(java.lang.String url) throws java.net.MalformedURLException
url
- String representation of the URL to parse
java.net.MalformedURLException
- if the URL could not be parsedpublic java.lang.String getHost()
URL.getHost()
public int getPort()
URL.getPort()
public java.lang.String getPath()
URL.getPath()
public java.lang.String getFile()
URL.getFile()
public java.lang.String getAuthority()
URL.getAuthority()
public java.lang.String getProtocol()
URL.getProtocol()
public java.lang.String getQuery()
URL.getQuery()
public java.lang.String getReference()
public java.lang.String getURLString()
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |