|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimplespider.simplespider.util.SimpleUrl
public class SimpleUrl
this class exist to provide a system-wide normal form representation of urls, and to prevent that java.net.URL usage causes DNS queries which are used in java.net.
Based on de.anomic.yacy.yacyURL
| Constructor Summary | |
|---|---|
SimpleUrl(SimpleUrl baseURL)
Copy constructor |
|
SimpleUrl(SimpleUrl baseURL,
String relPath)
|
|
SimpleUrl(String url)
|
|
SimpleUrl(String protocol,
String host,
int port,
String path)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Object h)
|
boolean |
equals(Object obj)
|
static String |
escape(String s)
Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal. |
String |
getAuthority()
Escapes the following parts of the url, this object already contains: path: see escape(String) ref: same as
above quest: same as above without the ampersand ("&") and the equals symbol |
String |
getFile()
|
String |
getFile(boolean includeReference)
|
String |
getFileName()
|
String |
getHost()
|
String |
getPath()
|
int |
getPort()
|
String |
getProtocol()
|
String |
getQuery()
|
String |
getRef()
|
String |
getUserInfo()
|
int |
hashCode()
|
boolean |
isCGI()
|
boolean |
isPOST()
|
String |
language()
|
static void |
main(String[] args)
|
static SimpleUrl |
newURL(SimpleUrl baseURL,
String relPath)
|
static SimpleUrl |
newURL(String baseURL,
String relPath)
|
String |
toNormalform(boolean includeReference)
|
String |
toNormalform(boolean includeReference,
boolean stripAmp)
|
String |
toString()
|
static String |
unescape(String s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleUrl(SimpleUrl baseURL,
String relPath)
throws MalformedURLException
MalformedURLException
public SimpleUrl(String url)
throws MalformedURLException
MalformedURLException
public SimpleUrl(String protocol,
String host,
int port,
String path)
throws MalformedURLException
MalformedURLExceptionpublic SimpleUrl(SimpleUrl baseURL)
baseURL - must not be null
NullPointerException - if baseUrl is null| Method Detail |
|---|
public static String escape(String s)
s - The string to be encoded
public static void main(String[] args)
public static SimpleUrl newURL(SimpleUrl baseURL,
String relPath)
throws MalformedURLException
MalformedURLException
public static SimpleUrl newURL(String baseURL,
String relPath)
throws MalformedURLException
MalformedURLExceptionpublic static String unescape(String s)
public int compareTo(Object h)
public boolean equals(Object obj)
equals in class Objectpublic String getAuthority()
escape(String)
public String getFile()
public String getFile(boolean includeReference)
public String getFileName()
public String getHost()
public String getPath()
public int getPort()
public String getProtocol()
public String getQuery()
public String getRef()
public String getUserInfo()
public int hashCode()
hashCode in class Objectpublic boolean isCGI()
public boolean isPOST()
public String language()
public String toNormalform(boolean includeReference)
public String toNormalform(boolean includeReference,
boolean stripAmp)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||