org.apache.wink.json4j.compat.impl
Class ApacheJSONStringerDelegate

java.lang.Object
  extended by org.apache.wink.json4j.compat.impl.ApacheJSONWriterDelegate
      extended by org.apache.wink.json4j.compat.impl.ApacheJSONStringerDelegate
All Implemented Interfaces:
JSONStringer, JSONWriter

public class ApacheJSONStringerDelegate
extends ApacheJSONWriterDelegate
implements JSONStringer


Field Summary
 
Fields inherited from class org.apache.wink.json4j.compat.impl.ApacheJSONWriterDelegate
delegate, writer
 
Constructor Summary
ApacheJSONStringerDelegate()
           
 
Method Summary
 void close()
          Over-ride to do nothing for the stringer.
 java.lang.String toString()
          Return a string of the stringer contents.
 
Methods inherited from class org.apache.wink.json4j.compat.impl.ApacheJSONWriterDelegate
array, endArray, endObject, flush, key, object, value, value, value, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.wink.json4j.compat.JSONWriter
array, endArray, endObject, flush, key, object, value, value, value, value, value
 

Constructor Detail

ApacheJSONStringerDelegate

public ApacheJSONStringerDelegate()
Method Detail

toString

public java.lang.String toString()
Return a string of the stringer contents. This also terminates the Stringer and it cannot be used again. If any errors occur while trying to generate the JSON it returns an empty string.

Specified by:
toString in interface JSONStringer
Overrides:
toString in class java.lang.Object

close

public void close()
           throws java.io.IOException,
                  java.lang.IllegalStateException
Over-ride to do nothing for the stringer. Only toString() terminates the stringer object.

Specified by:
close in interface JSONWriter
Overrides:
close in class ApacheJSONWriterDelegate
Throws:
java.io.IOException
java.lang.IllegalStateException


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.