Package org.wicketstuff.htmlcompressor
Class HtmlCompressingXmlPullParser
java.lang.Object
org.wicketstuff.htmlcompressor.HtmlCompressingXmlPullParser
- All Implemented Interfaces:
IXmlPullParser
IXmlPullParser implementation with the delegation pattern. Compresses the markup before
passing it to the delegated parser. It is constructed by HtmlCompressingMarkupFactory.- Author:
- akiraly
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.wicket.markup.parser.IXmlPullParser
IXmlPullParser.HttpTagType -
Constructor Summary
ConstructorsConstructorDescriptionHtmlCompressingXmlPullParser(IXmlPullParser delegate, com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.googlecode.htmlcompressor.compressor.HtmlCompressorGetter for the html compressor.Getter for the "real" xml pull parser.getInput(int fromPos, int toPos) getInputFromPositionMarker(int toPos) next()voidparse(InputStream inputStream) voidparse(InputStream inputStream, String encoding) voidparse(CharSequence string) voidvoidsetPositionMarker(int pos)
-
Constructor Details
-
HtmlCompressingXmlPullParser
public HtmlCompressingXmlPullParser(IXmlPullParser delegate, com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor) Constructor.- Parameters:
delegate- the wrapped, "real" parser, not nullcompressor- the html compressor, not null
-
-
Method Details
-
parse
- Specified by:
parsein interfaceIXmlPullParser- Throws:
IOException
-
parse
- Specified by:
parsein interfaceIXmlPullParser- Throws:
IOException
-
parse
- Specified by:
parsein interfaceIXmlPullParser- Throws:
IOException
-
getEncoding
- Specified by:
getEncodingin interfaceIXmlPullParser
-
getDoctype
- Specified by:
getDoctypein interfaceIXmlPullParser
-
getInputFromPositionMarker
- Specified by:
getInputFromPositionMarkerin interfaceIXmlPullParser
-
getInput
- Specified by:
getInputin interfaceIXmlPullParser
-
next
- Specified by:
nextin interfaceIXmlPullParser- Throws:
ParseException
-
getElement
- Specified by:
getElementin interfaceIXmlPullParser
-
getString
- Specified by:
getStringin interfaceIXmlPullParser
-
setPositionMarker
public void setPositionMarker()- Specified by:
setPositionMarkerin interfaceIXmlPullParser
-
setPositionMarker
public void setPositionMarker(int pos) - Specified by:
setPositionMarkerin interfaceIXmlPullParser
-
getDelegate
Getter for the "real" xml pull parser.- Returns:
- wrapped parser, not null
-
getCompressor
public com.googlecode.htmlcompressor.compressor.HtmlCompressor getCompressor()Getter for the html compressor.- Returns:
- html compressor, not null
-