|
|||||||||||
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.UrlAwareTextFormatter
Reformats plain text URLs in a text stream into HTML anchors.
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 | |
UrlAwareTextFormatter(Reader in)
Deprecated. |
|
UrlAwareTextFormatter(String text)
Deprecated. |
Method Summary | |
(package private) void |
handleDefault(char c)
Deprecated. |
(package private) void |
handleNotUrl(String word)
Deprecated. Called when a non-url is found. |
(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. Loops until the end of the stream is reached, calling the abstract parseWord(), handleEol() and handleEof() methods as appropriate |
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 UrlAwareTextFormatter(Reader in)
public UrlAwareTextFormatter(String text)
Method Detail |
public Object parse() throws IOException
TextParser
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
UrlAwareParser
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 |