Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.xml.stream
Interface XMLInputStream

All Known Subinterfaces:
BufferedXMLInputStream, SecureInputStream, XMLInputOutputStream, XMLInputStreamFilter
All Known Implementing Classes:
PipedXMLInputStreamBase, XMLInputOutputStreamBase, XMLInputStreamFilterBase, XMLSubStreamBase

public interface XMLInputStream

Method Summary
abstract  void close()
          Closes this input stream and releases any system resources associated with the stream.
abstract  ReferenceResolver getReferenceResolver()
          Returns the reference resolver that was set for this stream, returns null if no ReferenceResolver has been set.
abstract  XMLInputStream getSubStream()
          getSubStream() returns a stream which points to the entire next element in the current stream.
abstract  boolean hasNext()
          Check if there are more events to pull of the stream
abstract  XMLEvent next()
          Get the next XMLEvent on the stream
abstract  XMLEvent peek()
          Check the next XMLEvent without reading it from the stream.
abstract  void setReferenceResolver(ReferenceResolver resolver)
          Provides a way to set the ReferenceResolver of the stream, this is mostly needed for handle references to other parts of the document.
abstract  void skip()
          Skip the next stream event
abstract  boolean skip(int eventType)
          Position the stream at the next XMLEvent of this type.
abstract  boolean skip(XMLName name)
          Position the stream at the next element of this name.
abstract  boolean skip(XMLName name, int eventType)
          Position the stream at the next element of this name and this type.
abstract  void skipElement()
          Skips the entire next start tag / end tag pair.

 

Method Detail

next

XMLEvent next()
              throws XMLStreamException
Get the next XMLEvent on the stream
Throws:
XMLStreamException
See Also:
XMLEvent

hasNext

boolean hasNext()
                throws XMLStreamException
Check if there are more events to pull of the stream
Throws:
XMLStreamException
See Also:
XMLEvent

skip

void skip()
          throws XMLStreamException
Skip the next stream event
Throws:
XMLStreamException

skipElement

void skipElement()
                 throws XMLStreamException
Skips the entire next start tag / end tag pair.
Throws:
XMLStreamException

peek

XMLEvent peek()
              throws XMLStreamException
Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents.
Throws:
XMLStreamException
See Also:
XMLEvent

skip

boolean skip(int eventType)
             throws XMLStreamException
Position the stream at the next XMLEvent of this type. The method returns true if the stream contains another XMLEvent of this type and false otherwise.
Parameters:
eventType - An integer code that indicates the element type.
Throws:
XMLStreamException
See Also:
XMLEvent

skip

boolean skip(XMLName name)
             throws XMLStreamException
Position the stream at the next element of this name. The method returns true if the stream contains another element with this name and false otherwise. Skip is a forward operator only. It does not look backward in the stream.
Parameters:
name - An object that defines an XML name. If the XMLName.getNameSpaceName() method on the XMLName argument returns null the XMLName will match just the local name. Prefixes are not checked for equality.
Throws:
XMLStreamException
See Also:
XMLName

skip

boolean skip(XMLName name,
             int eventType)
             throws XMLStreamException
Position the stream at the next element of this name and this type. The method returns true if the stream contains another element with this name of this type and false otherwise.
Parameters:
name - An object that defines an XML name. If the XMLName.getNameSpaceName() method on the XMLName argument returns null the XMLName will match just the local name. Prefixes are not checked for equality.
eventType - An integer code that indicates the element type.
Throws:
XMLStreamException
See Also:
XMLEvent, XMLName

getSubStream

XMLInputStream getSubStream()
                            throws XMLStreamException
getSubStream() returns a stream which points to the entire next element in the current stream. For example: take a document that has a root node A, where the children of A are B, C, and D. If the stream is pointing to the start element of A, getSubStream() will return A, B, C and D including the start element of A and the end element of A. The position of the parent stream is not changed and the events read by the substream are written back to its parent.
Throws:
XMLStreamException

close

void close()
           throws XMLStreamException
Closes this input stream and releases any system resources associated with the stream.
Throws:
XMLStreamException

getReferenceResolver

ReferenceResolver getReferenceResolver()
Returns the reference resolver that was set for this stream, returns null if no ReferenceResolver has been set.
See Also:
ReferenceResolver

setReferenceResolver

void setReferenceResolver(ReferenceResolver resolver)
Provides a way to set the ReferenceResolver of the stream, this is mostly needed for handle references to other parts of the document.
See Also:
ReferenceResolver

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09