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(InputStream inputStream)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader and returns resources.
|
Collection<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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ResultsReaderXml(InputStream inputStream) throws IOException
inputStream
- The XML stream to parse.IOException
- The IOException instancepublic void close() throws IOException
close
in class ResultsReader
IOException
- On IO exception.public boolean isPreview()
true
if the results are a preview, false
if not.public Collection<String> getFields()
Note that any given result will contain a subset of these fields.
Copyright © 2022 Splunk, Inc.. All rights reserved.