com.fasterxml.jackson.xml.util
Class DefaultXmlPrettyPrinter

java.lang.Object
  extended by com.fasterxml.jackson.xml.util.DefaultXmlPrettyPrinter
All Implemented Interfaces:
org.codehaus.jackson.PrettyPrinter

public class DefaultXmlPrettyPrinter
extends Object
implements org.codehaus.jackson.PrettyPrinter

Indentation to use with XML is different from JSON, because JSON requires use of separator characters and XML just basic whitespace.

Since:
1.7

Constructor Summary
DefaultXmlPrettyPrinter()
           
 
Method Summary
 void beforeArrayValues(org.codehaus.jackson.JsonGenerator jgen)
           
 void beforeObjectEntries(org.codehaus.jackson.JsonGenerator jg)
           
 void writeArrayValueSeparator(org.codehaus.jackson.JsonGenerator jgen)
           
 void writeEndArray(org.codehaus.jackson.JsonGenerator jgen, int nrOfValues)
           
 void writeEndObject(org.codehaus.jackson.JsonGenerator jgen, int nrOfEntries)
           
 void writeObjectEntrySeparator(org.codehaus.jackson.JsonGenerator jg)
           
 void writeObjectFieldValueSeparator(org.codehaus.jackson.JsonGenerator jg)
           
 void writeRootValueSeparator(org.codehaus.jackson.JsonGenerator jgen)
           
 void writeStartArray(org.codehaus.jackson.JsonGenerator jgen)
           
 void writeStartObject(org.codehaus.jackson.JsonGenerator jgen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXmlPrettyPrinter

public DefaultXmlPrettyPrinter()
Method Detail

writeRootValueSeparator

public void writeRootValueSeparator(org.codehaus.jackson.JsonGenerator jgen)
                             throws IOException,
                                    org.codehaus.jackson.JsonGenerationException
Specified by:
writeRootValueSeparator in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

beforeArrayValues

public void beforeArrayValues(org.codehaus.jackson.JsonGenerator jgen)
                       throws IOException,
                              org.codehaus.jackson.JsonGenerationException
Specified by:
beforeArrayValues in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeStartArray

public void writeStartArray(org.codehaus.jackson.JsonGenerator jgen)
                     throws IOException,
                            org.codehaus.jackson.JsonGenerationException
Specified by:
writeStartArray in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeArrayValueSeparator

public void writeArrayValueSeparator(org.codehaus.jackson.JsonGenerator jgen)
                              throws IOException,
                                     org.codehaus.jackson.JsonGenerationException
Specified by:
writeArrayValueSeparator in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeEndArray

public void writeEndArray(org.codehaus.jackson.JsonGenerator jgen,
                          int nrOfValues)
                   throws IOException,
                          org.codehaus.jackson.JsonGenerationException
Specified by:
writeEndArray in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

beforeObjectEntries

public void beforeObjectEntries(org.codehaus.jackson.JsonGenerator jg)
                         throws IOException,
                                org.codehaus.jackson.JsonGenerationException
Specified by:
beforeObjectEntries in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeStartObject

public void writeStartObject(org.codehaus.jackson.JsonGenerator jgen)
                      throws IOException,
                             org.codehaus.jackson.JsonGenerationException
Specified by:
writeStartObject in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeObjectEntrySeparator

public void writeObjectEntrySeparator(org.codehaus.jackson.JsonGenerator jg)
                               throws IOException,
                                      org.codehaus.jackson.JsonGenerationException
Specified by:
writeObjectEntrySeparator in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeObjectFieldValueSeparator

public void writeObjectFieldValueSeparator(org.codehaus.jackson.JsonGenerator jg)
                                    throws IOException,
                                           org.codehaus.jackson.JsonGenerationException
Specified by:
writeObjectFieldValueSeparator in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException

writeEndObject

public void writeEndObject(org.codehaus.jackson.JsonGenerator jgen,
                           int nrOfEntries)
                    throws IOException,
                           org.codehaus.jackson.JsonGenerationException
Specified by:
writeEndObject in interface org.codehaus.jackson.PrettyPrinter
Throws:
IOException
org.codehaus.jackson.JsonGenerationException


Copyright © 2011 fasterxml.com. All Rights Reserved.