org.makumba.controller
Class EmptyLineFilter

java.lang.Object
  extended by org.makumba.controller.EmptyLineFilter
All Implemented Interfaces:
Filter

public class EmptyLineFilter
extends Object
implements Filter

Implements a filter that deletes empty lines in HTML, i.e. can be used to beautify the resulting output of a JSP page. The filter does respect <pre> tags, but will ignore CSS styles of type white-space: pre.

Version:
$Id: EmptyLineFilter.java,v 1.1 Sep 19, 2007 12:25:54 AM rudi Exp $
Author:
Rudolf Mayer

Nested Class Summary
(package private)  class EmptyLineFilter.EmptyLineFilterPrintWriter
           
(package private)  class EmptyLineFilter.EmptyLineFilterStream
           
(package private)  class EmptyLineFilter.EmptyLineFilterWrapper
           
 
Constructor Summary
EmptyLineFilter()
           
 
Method Summary
 String deleteEmptyLines(Reader reader)
           
 void deleteEmptyLines(Reader reader, Writer writer)
           
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 void init(FilterConfig filterConfig)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyLineFilter

public EmptyLineFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
Specified by:
init in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter

deleteEmptyLines

public void deleteEmptyLines(Reader reader,
                             Writer writer)
                      throws IOException
Throws:
IOException

deleteEmptyLines

public String deleteEmptyLines(Reader reader)
                        throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException