public class JsonContentHandlerJacksonWrapper extends Object implements ContentHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
SYSTEM_LINE_FEED |
| Constructor and Description |
|---|
JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Object o)
Makes a Json content handler, using a specified JsonFactory instance that can
be configured according to the Jackson implementation.
|
JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Object o,
boolean isFormattedOutput)
Makes a Json content handler, using a specified JsonFactory instance that can
be configured according to the Jackson implementation, and
specifies a prettyprinting boolean flag (default is no prettyprinting).
|
JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
Makes a Json content handler, using a specified JsonGenerator instance
|
JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
boolean isFormattedOutput)
Makes a Json content handler, using a specified JsonGenerator instance
|
JsonContentHandlerJacksonWrapper(Object destination)
Makes a Json content handler that sends its output to the specified destination
|
JsonContentHandlerJacksonWrapper(Object o,
boolean isFormattedOutput)
Makes a Json content handler, and
specifies a prettyprinting boolean flag (default is no prettyprinting).
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endDocument() |
void |
endElement(String uri,
String localName,
String qName) |
void |
endPrefixMapping(String prefix) |
com.fasterxml.jackson.core.JsonGenerator |
getJsonGenerator() |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
boolean |
isFormattedOutput() |
void |
processingInstruction(String target,
String data) |
void |
setDocumentLocator(Locator locator) |
void |
skippedEntity(String name) |
void |
startDocument() |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
void |
withNl() |
void |
withoutNl() |
void |
writeNlJustBeforeNext()
Call this to indicate that the prettyprinter should write a new line just before the next significant output.
|
public static final String SYSTEM_LINE_FEED
public JsonContentHandlerJacksonWrapper(Object destination) throws SAXException
destination - - can be a File, an OutputStream, or a WriterSAXException - wrapping an IOExceptionpublic JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Object o)
throws SAXException
jsonFactory - -o - - where the output goesSAXException - wrapping an IOExceptionpublic JsonContentHandlerJacksonWrapper(Object o, boolean isFormattedOutput) throws SAXException
o - - where the output goesisFormattedOutput - -SAXException - wrapping an IOExceptionpublic JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Object o,
boolean isFormattedOutput)
throws SAXException
jsonFactory - -o - where the output goesisFormattedOutput - - true for pretty printingSAXException - wrapping an IOExceptionpublic JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
jsonGenerator - -public JsonContentHandlerJacksonWrapper(com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
boolean isFormattedOutput)
jsonGenerator - -isFormattedOutput - - set to true for prettyprinting, default is falsepublic boolean isFormattedOutput()
public com.fasterxml.jackson.core.JsonGenerator getJsonGenerator()
public void writeNlJustBeforeNext()
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void withoutNl()
public void withNl()
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.