Class XMLStreamReaderExtImpl

  • All Implemented Interfaces:
    javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamReader, XMLStreamReaderExt

    public class XMLStreamReaderExtImpl
    extends java.lang.Object
    implements XMLStreamReaderExt
    Author: Cezar Andrei (cezar.andrei at bea.com) Date: Nov 17, 2003
    • Constructor Detail

      • XMLStreamReaderExtImpl

        public XMLStreamReaderExtImpl​(javax.xml.stream.XMLStreamReader xmlStream)
    • Method Detail

      • getUnderlyingXmlStream

        public javax.xml.stream.XMLStreamReader getUnderlyingXmlStream()
      • getStringValue

        public java.lang.String getStringValue()
                                        throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String.
        Specified by:
        getStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getStringValue

        public java.lang.String getStringValue​(int wsStyle)
                                        throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String, with wsStyle applied.
        Specified by:
        getStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeStringValue

        public java.lang.String getAttributeStringValue​(int index)
                                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String.
        Specified by:
        getAttributeStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeStringValue

        public java.lang.String getAttributeStringValue​(int index,
                                                        int wsStyle)
                                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String, with wsStyle applied.
        Specified by:
        getAttributeStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBooleanValue

        public boolean getAttributeBooleanValue​(int index)
                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a boolean.
        Specified by:
        getAttributeBooleanValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeByteValue

        public byte getAttributeByteValue​(int index)
                                   throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a byte.
        Specified by:
        getAttributeByteValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeShortValue

        public short getAttributeShortValue​(int index)
                                     throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a short.
        Specified by:
        getAttributeShortValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeIntValue

        public int getAttributeIntValue​(int index)
                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as an int.
        Specified by:
        getAttributeIntValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeLongValue

        public long getAttributeLongValue​(int index)
                                   throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a long.
        Specified by:
        getAttributeLongValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBigIntegerValue

        public java.math.BigInteger getAttributeBigIntegerValue​(int index)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a BigInteger.
        Specified by:
        getAttributeBigIntegerValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBigDecimalValue

        public java.math.BigDecimal getAttributeBigDecimalValue​(int index)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a BigDecimal.
        Specified by:
        getAttributeBigDecimalValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeFloatValue

        public float getAttributeFloatValue​(int index)
                                     throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a float.
        Specified by:
        getAttributeFloatValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeDoubleValue

        public double getAttributeDoubleValue​(int index)
                                       throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a double.
        Specified by:
        getAttributeDoubleValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeHexBinaryValue

        public java.io.InputStream getAttributeHexBinaryValue​(int index)
                                                       throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the decoded hexbinary value as an InputStream.
        Specified by:
        getAttributeHexBinaryValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBase64Value

        public java.io.InputStream getAttributeBase64Value​(int index)
                                                    throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the decoded base64 value as anInputStream.
        Specified by:
        getAttributeBase64Value in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeCalendarValue

        public XmlCalendar getAttributeCalendarValue​(int index)
                                              throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as an XmlCalendar which extends Calendar.
        Specified by:
        getAttributeCalendarValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeDateValue

        public java.util.Date getAttributeDateValue​(int index)
                                             throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a Date.
        Specified by:
        getAttributeDateValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeQNameValue

        public javax.xml.namespace.QName getAttributeQNameValue​(int index)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a QName.
        Specified by:
        getAttributeQNameValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeStringValue

        public java.lang.String getAttributeStringValue​(java.lang.String uri,
                                                        java.lang.String local)
                                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String.
        Specified by:
        getAttributeStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeStringValue

        public java.lang.String getAttributeStringValue​(java.lang.String uri,
                                                        java.lang.String local,
                                                        int wsStyle)
                                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a String, with wsStyle applied.
        Specified by:
        getAttributeStringValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBooleanValue

        public boolean getAttributeBooleanValue​(java.lang.String uri,
                                                java.lang.String local)
                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a boolean.
        Specified by:
        getAttributeBooleanValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeByteValue

        public byte getAttributeByteValue​(java.lang.String uri,
                                          java.lang.String local)
                                   throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a byte.
        Specified by:
        getAttributeByteValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeShortValue

        public short getAttributeShortValue​(java.lang.String uri,
                                            java.lang.String local)
                                     throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a short.
        Specified by:
        getAttributeShortValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeIntValue

        public int getAttributeIntValue​(java.lang.String uri,
                                        java.lang.String local)
                                 throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as an int.
        Specified by:
        getAttributeIntValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeLongValue

        public long getAttributeLongValue​(java.lang.String uri,
                                          java.lang.String local)
                                   throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a long.
        Specified by:
        getAttributeLongValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBigIntegerValue

        public java.math.BigInteger getAttributeBigIntegerValue​(java.lang.String uri,
                                                                java.lang.String local)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a BigInteger.
        Specified by:
        getAttributeBigIntegerValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBigDecimalValue

        public java.math.BigDecimal getAttributeBigDecimalValue​(java.lang.String uri,
                                                                java.lang.String local)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a BigDecimal.
        Specified by:
        getAttributeBigDecimalValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeFloatValue

        public float getAttributeFloatValue​(java.lang.String uri,
                                            java.lang.String local)
                                     throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a float.
        Specified by:
        getAttributeFloatValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeDoubleValue

        public double getAttributeDoubleValue​(java.lang.String uri,
                                              java.lang.String local)
                                       throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a double.
        Specified by:
        getAttributeDoubleValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeHexBinaryValue

        public java.io.InputStream getAttributeHexBinaryValue​(java.lang.String uri,
                                                              java.lang.String local)
                                                       throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the decoded hexbinary value as an InputStream.
        Specified by:
        getAttributeHexBinaryValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeBase64Value

        public java.io.InputStream getAttributeBase64Value​(java.lang.String uri,
                                                           java.lang.String local)
                                                    throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the decoded base64 value as anInputStream.
        Specified by:
        getAttributeBase64Value in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeCalendarValue

        public XmlCalendar getAttributeCalendarValue​(java.lang.String uri,
                                                     java.lang.String local)
                                              throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as an XmlCalendar which extends Calendar.
        Specified by:
        getAttributeCalendarValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeDateValue

        public java.util.Date getAttributeDateValue​(java.lang.String uri,
                                                    java.lang.String local)
                                             throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a Date.
        Specified by:
        getAttributeDateValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeGDateValue

        public GDate getAttributeGDateValue​(java.lang.String uri,
                                            java.lang.String local)
                                     throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a GDate.
        Specified by:
        getAttributeGDateValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributeQNameValue

        public javax.xml.namespace.QName getAttributeQNameValue​(java.lang.String uri,
                                                                java.lang.String local)
                                                         throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Returns the value as a QName.
        Specified by:
        getAttributeQNameValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
                             throws javax.xml.stream.XMLStreamException
        Description copied from interface: XMLStreamReaderExt
        Sets the default value for the next getXXXValue() call. For example: setDefaultValue("7"); //the xml looks like: int i = getIntValue(); // returns 7 // from now on the default value will not apply anymore Note: Works for getAttributeXXXValue(...) too.
        Specified by:
        setDefaultValue in interface XMLStreamReaderExt
        Throws:
        javax.xml.stream.XMLStreamException
      • getProperty

        public java.lang.Object getProperty​(java.lang.String s)
                                     throws java.lang.IllegalArgumentException
        Specified by:
        getProperty in interface javax.xml.stream.XMLStreamReader
        Throws:
        java.lang.IllegalArgumentException
      • next

        public int next()
                 throws javax.xml.stream.XMLStreamException
        Specified by:
        next in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • require

        public void require​(int i,
                            java.lang.String s,
                            java.lang.String s1)
                     throws javax.xml.stream.XMLStreamException
        Specified by:
        require in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • getElementText

        public java.lang.String getElementText()
                                        throws javax.xml.stream.XMLStreamException
        Specified by:
        getElementText in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • nextTag

        public int nextTag()
                    throws javax.xml.stream.XMLStreamException
        Specified by:
        nextTag in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • hasNext

        public boolean hasNext()
                        throws javax.xml.stream.XMLStreamException
        Specified by:
        hasNext in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • close

        public void close()
                   throws javax.xml.stream.XMLStreamException
        Specified by:
        close in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • getNamespaceURI

        public java.lang.String getNamespaceURI​(java.lang.String s)
        Specified by:
        getNamespaceURI in interface javax.xml.stream.XMLStreamReader
      • isStartElement

        public boolean isStartElement()
        Specified by:
        isStartElement in interface javax.xml.stream.XMLStreamReader
      • isEndElement

        public boolean isEndElement()
        Specified by:
        isEndElement in interface javax.xml.stream.XMLStreamReader
      • isCharacters

        public boolean isCharacters()
        Specified by:
        isCharacters in interface javax.xml.stream.XMLStreamReader
      • isWhiteSpace

        public boolean isWhiteSpace()
        Specified by:
        isWhiteSpace in interface javax.xml.stream.XMLStreamReader
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String s,
                                                  java.lang.String s1)
        Specified by:
        getAttributeValue in interface javax.xml.stream.XMLStreamReader
      • getAttributeCount

        public int getAttributeCount()
        Specified by:
        getAttributeCount in interface javax.xml.stream.XMLStreamReader
      • getAttributeName

        public javax.xml.namespace.QName getAttributeName​(int i)
        Specified by:
        getAttributeName in interface javax.xml.stream.XMLStreamReader
      • getAttributeNamespace

        public java.lang.String getAttributeNamespace​(int i)
        Specified by:
        getAttributeNamespace in interface javax.xml.stream.XMLStreamReader
      • getAttributeLocalName

        public java.lang.String getAttributeLocalName​(int i)
        Specified by:
        getAttributeLocalName in interface javax.xml.stream.XMLStreamReader
      • getAttributePrefix

        public java.lang.String getAttributePrefix​(int i)
        Specified by:
        getAttributePrefix in interface javax.xml.stream.XMLStreamReader
      • getAttributeType

        public java.lang.String getAttributeType​(int i)
        Specified by:
        getAttributeType in interface javax.xml.stream.XMLStreamReader
      • getAttributeValue

        public java.lang.String getAttributeValue​(int i)
        Specified by:
        getAttributeValue in interface javax.xml.stream.XMLStreamReader
      • isAttributeSpecified

        public boolean isAttributeSpecified​(int i)
        Specified by:
        isAttributeSpecified in interface javax.xml.stream.XMLStreamReader
      • getNamespaceCount

        public int getNamespaceCount()
        Specified by:
        getNamespaceCount in interface javax.xml.stream.XMLStreamReader
      • getNamespacePrefix

        public java.lang.String getNamespacePrefix​(int i)
        Specified by:
        getNamespacePrefix in interface javax.xml.stream.XMLStreamReader
      • getNamespaceURI

        public java.lang.String getNamespaceURI​(int i)
        Specified by:
        getNamespaceURI in interface javax.xml.stream.XMLStreamReader
      • getNamespaceContext

        public javax.xml.namespace.NamespaceContext getNamespaceContext()
        Specified by:
        getNamespaceContext in interface javax.xml.stream.XMLStreamReader
      • getEventType

        public int getEventType()
        Specified by:
        getEventType in interface javax.xml.stream.XMLStreamReader
      • getText

        public java.lang.String getText()
        Specified by:
        getText in interface javax.xml.stream.XMLStreamReader
      • getTextCharacters

        public char[] getTextCharacters()
        Specified by:
        getTextCharacters in interface javax.xml.stream.XMLStreamReader
      • getTextCharacters

        public int getTextCharacters​(int i,
                                     char[] chars,
                                     int i1,
                                     int i2)
                              throws javax.xml.stream.XMLStreamException
        Specified by:
        getTextCharacters in interface javax.xml.stream.XMLStreamReader
        Throws:
        javax.xml.stream.XMLStreamException
      • getTextStart

        public int getTextStart()
        Specified by:
        getTextStart in interface javax.xml.stream.XMLStreamReader
      • getTextLength

        public int getTextLength()
        Specified by:
        getTextLength in interface javax.xml.stream.XMLStreamReader
      • getEncoding

        public java.lang.String getEncoding()
        Specified by:
        getEncoding in interface javax.xml.stream.XMLStreamReader
      • hasText

        public boolean hasText()
        Specified by:
        hasText in interface javax.xml.stream.XMLStreamReader
      • getLocation

        public javax.xml.stream.Location getLocation()
        Specified by:
        getLocation in interface javax.xml.stream.XMLStreamReader
      • getName

        public javax.xml.namespace.QName getName()
        Specified by:
        getName in interface javax.xml.stream.XMLStreamReader
      • getLocalName

        public java.lang.String getLocalName()
        Specified by:
        getLocalName in interface javax.xml.stream.XMLStreamReader
      • hasName

        public boolean hasName()
        Specified by:
        hasName in interface javax.xml.stream.XMLStreamReader
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
        Specified by:
        getNamespaceURI in interface javax.xml.stream.XMLStreamReader
      • getPrefix

        public java.lang.String getPrefix()
        Specified by:
        getPrefix in interface javax.xml.stream.XMLStreamReader
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in interface javax.xml.stream.XMLStreamReader
      • isStandalone

        public boolean isStandalone()
        Specified by:
        isStandalone in interface javax.xml.stream.XMLStreamReader
      • standaloneSet

        public boolean standaloneSet()
        Specified by:
        standaloneSet in interface javax.xml.stream.XMLStreamReader
      • getCharacterEncodingScheme

        public java.lang.String getCharacterEncodingScheme()
        Specified by:
        getCharacterEncodingScheme in interface javax.xml.stream.XMLStreamReader
      • getPITarget

        public java.lang.String getPITarget()
        Specified by:
        getPITarget in interface javax.xml.stream.XMLStreamReader
      • getPIData

        public java.lang.String getPIData()
        Specified by:
        getPIData in interface javax.xml.stream.XMLStreamReader