com.splunk
Class ResultsReaderXml

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

public class ResultsReaderXml
extends ResultsReader


Constructor Summary
ResultsReaderXml(java.io.InputStream inputStream)
          Class constructor.
 
Method Summary
 void close()
          Closes the reader and returns resources.
 java.util.HashMap<java.lang.String,java.lang.String> 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.lang.Exception
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, which generates 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 be parsed.
Throws:
java.lang.Exception - On exception.
Method Detail

close

public void close()
           throws java.lang.Exception
Closes the reader and returns resources.

Overrides:
close in class ResultsReader
Throws:
java.lang.Exception - on Exception

getNextEvent

public java.util.HashMap<java.lang.String,java.lang.String> getNextEvent()
                                                                  throws java.lang.Exception
Returns the next event in the event stream.

Overrides:
getNextEvent in class ResultsReader
Returns:
The hash map of key-value pairs for an entire event.
Throws:
java.lang.Exception - on Exception.