info.magnolia.cms.filters
Class RangeSupportFilter

java.lang.Object
  extended by info.magnolia.cms.filters.AbstractMgnlFilter
      extended by info.magnolia.cms.filters.RangeSupportFilter
All Implemented Interfaces:
MgnlFilter, javax.servlet.Filter

public class RangeSupportFilter
extends AbstractMgnlFilter

This filter will process any incoming requests containing Range or If-Range headers and swallow all produced output except for that matching the requested range.

Version:
$Id$

Nested Class Summary
protected  class RangeSupportFilter.RangeInfo
          Requested byte range.
 
Constructor Summary
RangeSupportFilter()
           
 
Method Summary
 void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
           
 boolean isWrapWriter()
           
 void setWrapWriter(boolean wrapWriter)
          RFP defines ony byte ranges, however writers operate on characters which might be more then one byte long.
 
Methods inherited from class info.magnolia.cms.filters.AbstractMgnlFilter
acceptsEncoding, acceptsGzipEncoding, addAndVerifyHeader, addBypass, addMapping, bypasses, destroy, doFilter, getBypasses, getDispatching, getMapping, getMappings, getName, headerContains, init, isEnabled, mapsTo, matches, matchesDispatching, setDispatching, setEnabled, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeSupportFilter

public RangeSupportFilter()
Method Detail

doFilter

public void doFilter(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in class AbstractMgnlFilter
Throws:
IOException
javax.servlet.ServletException

isWrapWriter

public boolean isWrapWriter()

setWrapWriter

public void setWrapWriter(boolean wrapWriter)
RFP defines ony byte ranges, however writers operate on characters which might be more then one byte long. We might be cutting the character in half at the boundary of range which might make some clients unhappy even tho they asked for it. Default value is true.

Parameters:
wrapWriter -


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.