public class ResultsReaderJson extends ResultsReader
ResultsReaderJson
class represents a streaming JSON reader for
Splunk search results. This class requires the gson-2.1.jar file in your
build path. If you want to access the preview events, use the
MultiResultsReaderJson
class.inputStream
Constructor and Description |
---|
ResultsReaderJson(InputStream inputStream)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader and returns resources.
|
Collection<String> |
getFields()
This method is not supported.
|
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 ResultsReaderJson(InputStream inputStream) throws IOException
inputStream
- The JSON 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()
Copyright © 2022 Splunk, Inc.. All rights reserved.