|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.util.XMLCompressionFilter
public final class XMLCompressionFilter
Compresses XML by removing redundant whitespace (etc). Should quickly reduce the size of many XML documents on the fly without changing their semantics.
This will allow document streaming (ie incremental processing) and will support flush() to allow the push of partial documents, although this may not be able to push partial XML atoms (eg partial elements and entities).
To avoid upsetting some older consumers of XML,
such as old mobile phones and PDAs,
this may avoid some transformations such as
<x></x> to <x/>.
To avoid upsetting older HTML consumers of XHTML
this may avoid some transformations such as
<br /> to <br/>.
| Field Summary | |
|---|---|
private javax.servlet.FilterConfig |
config
The filter configuration object we are associated with. |
private WebUtils.ServletLoggerWithFallback |
logger
Our logger which falls back to System.out if servlet log not available; never null. |
| Constructor Summary | |
|---|---|
XMLCompressionFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Take this filter out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Compacts the (XML) reponse text when possible. |
javax.servlet.FilterConfig |
getFilterConfig()
|
void |
init(javax.servlet.FilterConfig filterConfig)
Place this filter into service. |
void |
setFilterConfig(javax.servlet.FilterConfig c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final WebUtils.ServletLoggerWithFallback logger
private javax.servlet.FilterConfig config
| Constructor Detail |
|---|
public XMLCompressionFilter()
| Method Detail |
|---|
public javax.servlet.FilterConfig getFilterConfig()
public void setFilterConfig(javax.servlet.FilterConfig c)
public void init(javax.servlet.FilterConfig filterConfig)
init in interface javax.servlet.FilterfilterConfig - filter configuration object; null to unsetpublic void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOException
javax.servlet.ServletException
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||