public class JsonRootArraySplitter extends JsonSplitter
JsonSplitter
that splits a json array that is the root element of the document into json
object nodes.
This class must be closed in order to free underlying resources.
Constructor and Description |
---|
JsonRootArraySplitter(InputStream inputStream)
Creates a new instance that will split an JSON array into multiple payloads.
|
JsonRootArraySplitter(InputStream inputStream,
PayloadMetadata metadata)
Creates a new instance that will split an JSON array into multiple payloads.
|
Modifier and Type | Method and Description |
---|---|
protected JsonToken |
findNextNodeStart() |
protected void |
initialize() |
close, createGenerator, getParser, iterator, waitForToken, waitForTokens
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public JsonRootArraySplitter(InputStream inputStream) throws IOException
inputStream
- the incoming JSON DocumentIOException
public JsonRootArraySplitter(InputStream inputStream, PayloadMetadata metadata) throws IOException
PayloadMetadata
which will be the same for all the payloads.inputStream
- the incoming JSON Documentmetadata
- metadata attached to all PayloadsIOException
protected void initialize() throws IOException
initialize
in class JsonSplitter
IOException
protected JsonToken findNextNodeStart() throws IOException
findNextNodeStart
in class JsonSplitter
IOException