Compoze Software, Inc.

com.compoze.util
Class HtmlLinkFilterWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.FilterWriter
          extended bycom.compoze.util.TextLineFilterWriter
              extended bycom.compoze.util.HtmlLinkFilterWriter

public abstract class HtmlLinkFilterWriter
extends TextLineFilterWriter

This is a text filter writer that allows links in HTML documents to be processed by subclasses. Note that due to the limitations of the text line filter writer links may not span multiple lines. This class is not robust in that it does not always handle other whitespace as desired.


Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
HtmlLinkFilterWriter(java.io.Writer out)
          Constructor.
 
Method Summary
protected abstract  java.lang.String filterAction(java.lang.String sAction)
          This method is called once per form action that exists in the HTML document.
protected  java.lang.String filterLine(java.lang.String sLine)
          Filter a line of text.
protected abstract  java.lang.String filterLink(java.lang.String sLink)
          This method is called once per link that exists in the HTML document.
 
Methods inherited from class com.compoze.util.TextLineFilterWriter
flush, write, write, write
 
Methods inherited from class java.io.FilterWriter
close
 
Methods inherited from class java.io.Writer
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlLinkFilterWriter

public HtmlLinkFilterWriter(java.io.Writer out)
Constructor.

Parameters:
out - the underlying writer
Method Detail

filterLine

protected java.lang.String filterLine(java.lang.String sLine)
Filter a line of text. Subclasses must implement this to do their work.

Specified by:
filterLine in class TextLineFilterWriter
Parameters:
sLine - the line to write (does not include line termination characters)
Returns:
the filtered line

filterLink

protected abstract java.lang.String filterLink(java.lang.String sLink)
This method is called once per link that exists in the HTML document.

Parameters:
sLink - the link
Returns:
the modified link

filterAction

protected abstract java.lang.String filterAction(java.lang.String sAction)
This method is called once per form action that exists in the HTML document.

Parameters:
sAction - the action
Returns:
the modified action

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.