public class ResultsReaderXml extends ResultsReader
ResultsReaderXml
class represents a streaming XML reader for
Splunk search results. When a stream from an export search is passed to this
reader, it skips any preview events in the stream. If you want to access the
preview events, use the MultiResultsReaderXml
class.inputStream
Constructor and Description |
---|
ResultsReaderXml(java.io.InputStream inputStream)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader and returns resources.
|
java.util.Collection<java.lang.String> |
getFields()
Returns a collection of field names from the results.
|
boolean |
isPreview()
Indicates whether the results are a preview from an unfinished search.
|
getNextEvent, iterator
public ResultsReaderXml(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- The XML stream to parse.java.io.IOException
public void close() throws java.io.IOException
close
in class ResultsReader
java.io.IOException
- On IO exception.public boolean isPreview()
true
if the results are a preview, false
if not.public java.util.Collection<java.lang.String> getFields()
Note that any given result will contain a subset of these fields.