com.ibm.commons.util.io.json
Class JsonGenerator.Generator

java.lang.Object
  extended by com.ibm.commons.util.io.json.JsonGenerator.Generator
Direct Known Subclasses:
JsonGenerator.StringBuilderGenerator, JsonGenerator.StringGenerator, JsonGenerator.WriterGenerator
Enclosing class:
JsonGenerator

public abstract static class JsonGenerator.Generator
extends java.lang.Object

Generator base class.


Constructor Summary
protected JsonGenerator.Generator(JsonFactory factory, boolean compact)
           
 
Method Summary
 void decIndent()
           
 JsonFactory getFactory()
           
 int getIndentLevel()
           
 void incIndent()
           
 void indent()
           
 boolean isCompact()
           
 void nl()
           
abstract  void out(char c)
           
abstract  void out(java.lang.String s)
           
 void outArrayLiteral(java.lang.Object array)
           
 void outBooleanLiteral(boolean b)
           
 void outIntLiteral(int d)
           
 void outLiteral(java.lang.Object value)
           
 void outLongLiteral(long d)
           
 void outNull()
           
 void outNumberLiteral(double d)
           
 void outObject(java.lang.Object object)
           
 void outPropertyName(java.lang.String s)
           
 void outReference(JsonReference ref)
           
 void outStringLiteral(java.lang.String s)
           
 void setIndentLevel(int indentLevel)
           
 void toJson(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonGenerator.Generator

protected JsonGenerator.Generator(JsonFactory factory,
                                  boolean compact)
Method Detail

out

public abstract void out(char c)
                  throws java.io.IOException
Throws:
java.io.IOException

out

public abstract void out(java.lang.String s)
                  throws java.io.IOException
Throws:
java.io.IOException

getFactory

public JsonFactory getFactory()

getIndentLevel

public int getIndentLevel()

setIndentLevel

public void setIndentLevel(int indentLevel)

incIndent

public void incIndent()

decIndent

public void decIndent()

isCompact

public boolean isCompact()

toJson

public void toJson(java.lang.Object value)
            throws java.io.IOException,
                   JsonException
Throws:
java.io.IOException
JsonException

outLiteral

public void outLiteral(java.lang.Object value)
                throws java.io.IOException,
                       JsonException
Throws:
java.io.IOException
JsonException

outNull

public void outNull()
             throws java.io.IOException,
                    JsonException
Throws:
java.io.IOException
JsonException

outObject

public void outObject(java.lang.Object object)
               throws java.io.IOException,
                      JsonException
Throws:
java.io.IOException
JsonException

outPropertyName

public void outPropertyName(java.lang.String s)
                     throws java.io.IOException
Throws:
java.io.IOException

outStringLiteral

public void outStringLiteral(java.lang.String s)
                      throws java.io.IOException
Throws:
java.io.IOException

outNumberLiteral

public void outNumberLiteral(double d)
                      throws java.io.IOException
Throws:
java.io.IOException

outIntLiteral

public void outIntLiteral(int d)
                   throws java.io.IOException
Throws:
java.io.IOException

outLongLiteral

public void outLongLiteral(long d)
                    throws java.io.IOException
Throws:
java.io.IOException

outBooleanLiteral

public void outBooleanLiteral(boolean b)
                       throws java.io.IOException
Throws:
java.io.IOException

outArrayLiteral

public void outArrayLiteral(java.lang.Object array)
                     throws java.io.IOException,
                            JsonException
Throws:
java.io.IOException
JsonException

outReference

public void outReference(JsonReference ref)
                  throws java.io.IOException,
                         JsonException
Throws:
java.io.IOException
JsonException

indent

public void indent()
            throws java.io.IOException
Throws:
java.io.IOException

nl

public void nl()
        throws java.io.IOException
Throws:
java.io.IOException