com.ibm.portal.streaming.json
Class JsonParserOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.ibm.portal.streaming.json.JsonParserOutputStream
All Implemented Interfaces:
JsonContentHandlerProvider, java.io.Closeable, java.io.Flushable, java.nio.channels.Channel

public abstract class JsonParserOutputStream
extends java.io.OutputStream
implements JsonContentHandlerProvider, java.nio.channels.Channel

Parser that decomposes a JSON stream into callbacks to JsonContentHandler. The JSON content to be parsed is written onto the parser using the OutputStream 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.


Constructor Summary
JsonParserOutputStream()
           
 
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.OutputStream
close, flush, 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

JsonParserOutputStream

public JsonParserOutputStream()
Method Detail

reset

public abstract void reset()
                    throws java.io.IOException
Reinitialize the parsing process

Throws:
java.io.IOException

setJsonContentHandler

public abstract void setJsonContentHandler(JsonContentHandler handler)
Associates the JsonContentHandler that receives the events of the parsing process

Specified by:
setJsonContentHandler in interface JsonContentHandlerProvider
Parameters:
handler - handler to receive the events
See Also:
JsonContentHandlerProvider.getJsonContentHandler()