|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.htmlutil.TextParser
wt.htmlutil.UrlAwareParser
wt.htmlutil.WWWTester
Reformats URLs that begin with "www." into "http://www." urls.
Field Summary | |
private StringBuffer |
sbuf
Deprecated. |
private static String |
versionID
Deprecated. |
Fields inherited from class wt.htmlutil.UrlAwareParser |
HTTP, protocols, WWW |
Fields inherited from class wt.htmlutil.TextParser |
|
Constructor Summary | |
WWWTester(BufferedReader in)
Deprecated. |
|
WWWTester(String text)
Deprecated. |
Method Summary | |
(package private) void |
handleDefault(char c)
Deprecated. |
(package private) void |
handleNotUrl(String word)
Deprecated. If something isn't an URL, just append it. |
(package private) void |
handleUrl(String start,
String url,
String end,
boolean isWWW)
Deprecated. Formats an URL into an HTML anchor, then prints it to the outputstream. |
static void |
main(String[] args)
Deprecated. |
Object |
parse()
Deprecated. Parses the input stream, returns the formatted result. |
Methods inherited from class wt.htmlutil.UrlAwareParser |
handleEof, handleEol, handleNumber, handleWord, parseWord |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private StringBuffer sbuf
Constructor Detail |
public WWWTester(BufferedReader in)
public WWWTester(String text)
Method Detail |
public Object parse() throws IOException
parse
in class TextParser
IOException
UrlLister, UrlAwareTextFormatter
void handleUrl(String start, String url, String end, boolean isWWW) throws IOException
handleUrl
in class UrlAwareParser
start
- Any non-alphanumerics at the start of the token.url
- The url.end
- Any non-alphanumerics at the end of the token.isWWW
- A flag indicating the url has no protocol, but begins with "www.".
IOException
UrlAwareParser
void handleNotUrl(String word) throws IOException
handleNotUrl
in class UrlAwareParser
IOException
void handleDefault(char c) throws IOException
handleDefault
in class TextParser
IOException
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |