Class BufferingParser

java.lang.Object
org.apache.maven.model.transform.pull.BufferingParser
All Implemented Interfaces:
org.codehaus.plexus.util.xml.pull.XmlPullParser
Direct Known Subclasses:
NodeBufferingParser

public class BufferingParser extends Object implements org.codehaus.plexus.util.xml.pull.XmlPullParser
An xml pull parser filter base implementation.
Since:
4.0.0
Author:
Guillaume Nodet
  • Field Details

  • Constructor Details

    • BufferingParser

      public BufferingParser(org.codehaus.plexus.util.xml.pull.XmlPullParser xmlPullParser)
  • Method Details

    • setFeature

      public void setFeature(String name, boolean state) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      setFeature in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getFeature

      public boolean getFeature(String name)
      Specified by:
      getFeature in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • setProperty

      public void setProperty(String name, Object value) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      setProperty in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getProperty

      public Object getProperty(String name)
      Specified by:
      getProperty in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • setInput

      public void setInput(Reader in) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      setInput in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • setInput

      public void setInput(InputStream inputStream, String inputEncoding) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      setInput in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getInputEncoding

      public String getInputEncoding()
      Specified by:
      getInputEncoding in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • defineEntityReplacementText

      public void defineEntityReplacementText(String entityName, String replacementText) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      defineEntityReplacementText in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getNamespaceCount

      public int getNamespaceCount(int depth) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      getNamespaceCount in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getNamespacePrefix

      public String getNamespacePrefix(int pos) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      getNamespacePrefix in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getNamespaceUri

      public String getNamespaceUri(int pos) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      getNamespaceUri in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getNamespace

      public String getNamespace(String prefix)
      Specified by:
      getNamespace in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getDepth

      public int getDepth()
      Specified by:
      getDepth in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getPositionDescription

      public String getPositionDescription()
      Specified by:
      getPositionDescription in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getLineNumber

      public int getLineNumber()
      Specified by:
      getLineNumber in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getColumnNumber

      public int getColumnNumber()
      Specified by:
      getColumnNumber in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • isWhitespace

      public boolean isWhitespace() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      isWhitespace in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getText

      public String getText()
      Specified by:
      getText in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getTextCharacters

      public char[] getTextCharacters(int[] holderForStartAndLength)
      Specified by:
      getTextCharacters in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getName

      public String getName()
      Specified by:
      getName in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • isEmptyElementTag

      public boolean isEmptyElementTag() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      isEmptyElementTag in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • getAttributeCount

      public int getAttributeCount()
      Specified by:
      getAttributeCount in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributeNamespace

      public String getAttributeNamespace(int index)
      Specified by:
      getAttributeNamespace in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributeName

      public String getAttributeName(int index)
      Specified by:
      getAttributeName in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributePrefix

      public String getAttributePrefix(int index)
      Specified by:
      getAttributePrefix in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributeType

      public String getAttributeType(int index)
      Specified by:
      getAttributeType in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • isAttributeDefault

      public boolean isAttributeDefault(int index)
      Specified by:
      isAttributeDefault in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributeValue

      public String getAttributeValue(int index)
      Specified by:
      getAttributeValue in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • getAttributeValue

      public String getAttributeValue(String namespace, String name)
      Specified by:
      getAttributeValue in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
    • require

      public void require(int type, String namespace, String name) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Specified by:
      require in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • getEventType

      public int getEventType() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Specified by:
      getEventType in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • next

      public int next() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Specified by:
      next in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • nextToken

      public int nextToken() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Specified by:
      nextToken in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • nextTag

      public int nextTag() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Specified by:
      nextTag in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • nextText

      public String nextText() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Specified by:
      nextText in interface org.codehaus.plexus.util.xml.pull.XmlPullParser
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • bufferEvent

      protected BufferingParser.Event bufferEvent() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • pushEvent

      protected void pushEvent(BufferingParser.Event event)
    • accept

      protected boolean accept() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
      Throws:
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      IOException
    • bypass

      public void bypass(boolean bypass)
    • bypass

      public boolean bypass()
    • nullSafeAppend

      protected static String nullSafeAppend(String originalValue, String charSegment)