org.wicketstuff.htmlcompressor
Class HtmlCompressingXmlPullParser

java.lang.Object
  extended by org.wicketstuff.htmlcompressor.HtmlCompressingXmlPullParser
All Implemented Interfaces:
IXmlPullParser

public class HtmlCompressingXmlPullParser
extends Object
implements 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
HtmlCompressingXmlPullParser(IXmlPullParser delegate, com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor)
          Constructor.
 
Method Summary
 com.googlecode.htmlcompressor.compressor.HtmlCompressor getCompressor()
          Getter for the html compressor.
 IXmlPullParser getDelegate()
          Getter for the "real" xml pull parser.
 CharSequence getDoctype()
           
 XmlTag getElement()
           
 String getEncoding()
           
 CharSequence getInput(int fromPos, int toPos)
           
 CharSequence getInputFromPositionMarker(int toPos)
           
 CharSequence getString()
           
 IXmlPullParser.HttpTagType next()
           
 void parse(CharSequence string)
           
 void parse(InputStream inputStream)
           
 void parse(InputStream inputStream, String encoding)
           
 void setPositionMarker()
           
 void setPositionMarker(int pos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlCompressingXmlPullParser

public HtmlCompressingXmlPullParser(IXmlPullParser delegate,
                                    com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor)
Constructor.

Parameters:
delegate - the wrapped, "real" parser, not null
compressor - the html compressor, not null
Method Detail

parse

public void parse(CharSequence string)
           throws IOException
Specified by:
parse in interface IXmlPullParser
Throws:
IOException

parse

public void parse(InputStream inputStream)
           throws IOException
Specified by:
parse in interface IXmlPullParser
Throws:
IOException

parse

public void parse(InputStream inputStream,
                  String encoding)
           throws IOException
Specified by:
parse in interface IXmlPullParser
Throws:
IOException

getEncoding

public String getEncoding()
Specified by:
getEncoding in interface IXmlPullParser

getDoctype

public CharSequence getDoctype()
Specified by:
getDoctype in interface IXmlPullParser

getInputFromPositionMarker

public CharSequence getInputFromPositionMarker(int toPos)
Specified by:
getInputFromPositionMarker in interface IXmlPullParser

getInput

public CharSequence getInput(int fromPos,
                             int toPos)
Specified by:
getInput in interface IXmlPullParser

next

public IXmlPullParser.HttpTagType next()
                                throws ParseException
Specified by:
next in interface IXmlPullParser
Throws:
ParseException

getElement

public XmlTag getElement()
Specified by:
getElement in interface IXmlPullParser

getString

public CharSequence getString()
Specified by:
getString in interface IXmlPullParser

setPositionMarker

public void setPositionMarker()
Specified by:
setPositionMarker in interface IXmlPullParser

setPositionMarker

public void setPositionMarker(int pos)
Specified by:
setPositionMarker in interface IXmlPullParser

getDelegate

public IXmlPullParser 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


Copyright © 2012. All Rights Reserved.