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(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()
This method is not supported.
|
boolean |
isPreview()
Indicates whether the results are a preview from an unfinished search.
|
getNextEvent, iterator
public ResultsReaderJson(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- The JSON 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()