com.liferay.portal.servlet.filters.strip
Class StripFilter

java.lang.Object
  extended by com.liferay.portal.kernel.servlet.BaseFilter
      extended by com.liferay.portal.servlet.filters.BasePortalFilter
          extended by com.liferay.portal.servlet.filters.strip.StripFilter
All Implemented Interfaces:
javax.servlet.Filter

public class StripFilter
extends BasePortalFilter

View Source

Author:
Brian Wing Shun Chan, Raymond Augé, Shuyang Zhou

Field Summary
static java.lang.String SKIP_FILTER
           
 
Constructor Summary
StripFilter()
           
 
Method Summary
protected  int countContinuousWhiteSpace(byte[] oldByteArray, int offset)
           
protected  boolean hasMarker(byte[] oldByteArray, int pos, byte[] marker)
           
protected  boolean isAlreadyFiltered(javax.servlet.http.HttpServletRequest request)
           
protected  boolean isInclude(javax.servlet.http.HttpServletRequest request)
           
protected  boolean isStrip(javax.servlet.http.HttpServletRequest request)
           
protected  int processCSS(byte[] oldByteArray, com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes, int currentIndex)
           
protected  void processFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
           
protected  int processJavaScript(byte[] oldByteArray, com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes, int currentIndex, byte[] openTag)
           
protected  int processPre(byte[] oldByteArray, com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes, int currentIndex)
           
protected  int processTextArea(byte[] oldByteArray, com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes, int currentIndex)
           
protected  byte[] strip(byte[] oldByteArray)
           
 
Methods inherited from class com.liferay.portal.servlet.filters.BasePortalFilter
getLog, isFilterEnabled
 
Methods inherited from class com.liferay.portal.kernel.servlet.BaseFilter
destroy, doFilter, getFilterConfig, init, processFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKIP_FILTER

public static final java.lang.String SKIP_FILTER
Constructor Detail

StripFilter

public StripFilter()
Method Detail

countContinuousWhiteSpace

protected int countContinuousWhiteSpace(byte[] oldByteArray,
                                        int offset)

hasMarker

protected boolean hasMarker(byte[] oldByteArray,
                            int pos,
                            byte[] marker)

isAlreadyFiltered

protected boolean isAlreadyFiltered(javax.servlet.http.HttpServletRequest request)

isInclude

protected boolean isInclude(javax.servlet.http.HttpServletRequest request)

isStrip

protected boolean isStrip(javax.servlet.http.HttpServletRequest request)

processCSS

protected int processCSS(byte[] oldByteArray,
                         com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes,
                         int currentIndex)

processFilter

protected void processFilter(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             javax.servlet.FilterChain filterChain)
                      throws java.lang.Exception
Specified by:
processFilter in class com.liferay.portal.kernel.servlet.BaseFilter
Throws:
java.lang.Exception

processJavaScript

protected int processJavaScript(byte[] oldByteArray,
                                com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes,
                                int currentIndex,
                                byte[] openTag)

processPre

protected int processPre(byte[] oldByteArray,
                         com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes,
                         int currentIndex)

processTextArea

protected int processTextArea(byte[] oldByteArray,
                              com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream newBytes,
                              int currentIndex)

strip

protected byte[] strip(byte[] oldByteArray)