|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer com.ibm.portal.streaming.json.JsonParserWriter
public abstract class JsonParserWriter
Parser that decomposes a JSON stream into callbacks to
JsonContentHandler
. The JSON content to be parsed is written onto the
parser using the Writer
methods. The writer must be closed via
Closeable.close()
to complete the event sequence. New content can be
parsed by reinitializing the parser using the reset()
method. The
parser will parse a sequence of JSON objects and generates
JsonContentHandler.startDocument()
and
JsonContentHandler.endDocument()
callbacks for each detected object
in the stream. All content between JSON objects is considered garbage and
will not be communicated to the handler.
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Fields inherited from interface com.ibm.portal.streaming.json.JsonStream |
---|
CONTENT_TYPE_JSON |
Constructor Summary | |
---|---|
JsonParserWriter()
|
Method Summary | |
---|---|
abstract void |
reset()
Reinitialize the parsing process |
abstract void |
setJsonContentHandler(JsonContentHandler handler)
Associates the JsonContentHandler that receives the events of the
parsing process |
Methods inherited from class java.io.Writer |
---|
append, append, append, close, flush, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.portal.streaming.json.JsonContentHandlerProvider |
---|
getJsonContentHandler |
Methods inherited from interface java.nio.channels.Channel |
---|
close, isOpen |
Constructor Detail |
---|
public JsonParserWriter()
Method Detail |
---|
public abstract void reset() throws java.io.IOException
java.io.IOException
public abstract void setJsonContentHandler(JsonContentHandler handler)
JsonContentHandler
that receives the events of the
parsing process
setJsonContentHandler
in interface JsonContentHandlerProvider
handler
- handler to receive the eventsJsonContentHandlerProvider.getJsonContentHandler()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |