net.minidev.json.parser
Class ContentHandlerCompressor

java.lang.Object
  extended by net.minidev.json.parser.ContentHandlerCompressor
All Implemented Interfaces:
ContentHandler

public class ContentHandlerCompressor
extends Object
implements ContentHandler


Constructor Summary
ContentHandlerCompressor(Appendable out, JSONStyle compression)
           
 
Method Summary
 boolean endArray()
          Receive notification of the end of a JSON array.
 void endJSON()
          Receive notification of the end of JSON processing.
 boolean endObject()
          Receive notification of the end of a JSON object.
 boolean endObjectEntry()
          Receive notification of the end of the value of previous object entry.
 boolean primitive(Object value)
          Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean null
 boolean startArray()
          Receive notification of the beginning of a JSON array.
 void startJSON()
          Receive notification of the beginning of JSON processing.
 boolean startObject()
          Receive notification of the beginning of a JSON object.
 boolean startObjectEntry(String key)
          Receive notification of the beginning of a JSON object entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandlerCompressor

public ContentHandlerCompressor(Appendable out,
                                JSONStyle compression)
Method Detail

startJSON

public void startJSON()
               throws ParseException,
                      IOException
Description copied from interface: ContentHandler
Receive notification of the beginning of JSON processing. The parser will invoke this method only once.

Specified by:
startJSON in interface ContentHandler
Throws:
ParseException - - JSONParser will stop and throw the same exception to the caller when receiving this exception.
IOException

endJSON

public void endJSON()
             throws ParseException,
                    IOException
Description copied from interface: ContentHandler
Receive notification of the end of JSON processing.

Specified by:
endJSON in interface ContentHandler
Throws:
ParseException
IOException

startObject

public boolean startObject()
                    throws ParseException,
                           IOException
Description copied from interface: ContentHandler
Receive notification of the beginning of a JSON object.

Specified by:
startObject in interface ContentHandler
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException - - JSONParser will stop and throw the same exception to the caller when receiving this exception.
IOException
See Also:
ContentHandler.endJSON()

endObject

public boolean endObject()
                  throws ParseException,
                         IOException
Description copied from interface: ContentHandler
Receive notification of the end of a JSON object.

Specified by:
endObject in interface ContentHandler
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException
See Also:
ContentHandler.startObject()

startObjectEntry

public boolean startObjectEntry(String key)
                         throws ParseException,
                                IOException
Description copied from interface: ContentHandler
Receive notification of the beginning of a JSON object entry.

Specified by:
startObjectEntry in interface ContentHandler
Parameters:
key - - Key of a JSON object entry.
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException
See Also:
ContentHandler.endObjectEntry()

endObjectEntry

public boolean endObjectEntry()
                       throws ParseException,
                              IOException
Description copied from interface: ContentHandler
Receive notification of the end of the value of previous object entry.

Specified by:
endObjectEntry in interface ContentHandler
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException
See Also:
ContentHandler.startObjectEntry(java.lang.String)

startArray

public boolean startArray()
                   throws ParseException,
                          IOException
Description copied from interface: ContentHandler
Receive notification of the beginning of a JSON array.

Specified by:
startArray in interface ContentHandler
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException
See Also:
ContentHandler.endArray()

endArray

public boolean endArray()
                 throws ParseException,
                        IOException
Description copied from interface: ContentHandler
Receive notification of the end of a JSON array.

Specified by:
endArray in interface ContentHandler
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException
See Also:
ContentHandler.startArray()

primitive

public boolean primitive(Object value)
                  throws ParseException,
                         IOException
Description copied from interface: ContentHandler
Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean null

Specified by:
primitive in interface ContentHandler
Parameters:
value - - Instance of the following: java.lang.String, java.lang.Number, java.lang.Boolean null
Returns:
false if the handler wants to stop parsing after return.
Throws:
ParseException
IOException


Copyright © 2011 Chemouni Uriel. All Rights Reserved.