com.splunk
Class ResultsReaderXml

java.lang.Object
  extended by com.splunk.ResultsReader
      extended by com.splunk.ResultsReaderXml

public class ResultsReaderXml
extends ResultsReader

The ResultsReaderXml class represents a streaming XML reader for Splunk search results.


Constructor Summary
ResultsReaderXml(java.io.InputStream inputStream)
          Class constructor.
 
Method Summary
 void close()
          Closes the reader and returns resources.
 Event getNextEvent()
          Returns the next event in the event stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultsReaderXml

public ResultsReaderXml(java.io.InputStream inputStream)
                 throws java.io.IOException
Class constructor. Constructs a streaming XML reader for the event stream. You should only attempt to parse an XML stream with the XML reader. Unpredictable results may occur if you use a non-XML stream.
The pushback reader tweaks export streams to generate non-strict XML at the beginning of the stream. The streaming reader ignores preview data, and only extracts finalized data.

Parameters:
inputStream - The stream to parse.
Throws:
java.lang.Exception - On exception.
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Closes the reader and returns resources.

Overrides:
close in class ResultsReader
Throws:
java.io.IOException - On IO exception.

getNextEvent

public Event getNextEvent()
                   throws java.io.IOException
Returns the next event in the event stream.

Specified by:
getNextEvent in class ResultsReader
Returns:
The map of key-value pairs for an event. The format of multi-item values is implementation-specific. We recommend using the methods from the Event class to interpret multi-item values.
Throws:
java.io.IOException - On IO exception.