wt.htmlutil
Class WWWTester

java.lang.Object
  extended bywt.htmlutil.TextParser
      extended bywt.htmlutil.UrlAwareParser
          extended bywt.htmlutil.WWWTester

public class WWWTester
extends UrlAwareParser

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

versionID

private static final String versionID
Deprecated. 
See Also:
Constant Field Values

sbuf

private StringBuffer sbuf
Deprecated. 
Constructor Detail

WWWTester

public WWWTester(BufferedReader in)
Deprecated. 

WWWTester

public WWWTester(String text)
Deprecated. 
Method Detail

parse

public Object parse()
             throws IOException
Deprecated. 
Parses the input stream, returns the formatted result.

Overrides:
parse in class TextParser
Returns:
The default return value is null, but the option is left open for subclasses to return something valuable.
Throws:
IOException
See Also:
UrlLister, UrlAwareTextFormatter

handleUrl

void handleUrl(String start,
               String url,
               String end,
               boolean isWWW)
         throws IOException
Deprecated. 
Formats an URL into an HTML anchor, then prints it to the outputstream.

Specified by:
handleUrl in class UrlAwareParser
Parameters:
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.".
Throws:
IOException
See Also:
UrlAwareParser

handleNotUrl

void handleNotUrl(String word)
            throws IOException
Deprecated. 
If something isn't an URL, just append it.

Specified by:
handleNotUrl in class UrlAwareParser
Throws:
IOException

handleDefault

void handleDefault(char c)
             throws IOException
Deprecated. 
Specified by:
handleDefault in class TextParser
Throws:
IOException

main

public static void main(String[] args)
Deprecated.