- java.lang.Object
-
- org.xbib.content.core.AbstractXContentGenerator
-
- org.xbib.content.xml.XmlXContentGenerator
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable,org.xbib.content.XContentGenerator
public class XmlXContentGenerator extends org.xbib.content.core.AbstractXContentGeneratorContent generator for XML formatted content.
-
-
Constructor Summary
Constructors Constructor Description XmlXContentGenerator(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator generator)XmlXContentGenerator(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator generator, XmlXParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.xbib.content.XContentcontent()voidcopy(org.xbib.content.XContentBuilder builder, java.io.OutputStream outputStream)voidcopyCurrentStructure(org.xbib.content.XContentParser parser)voidflush()XmlXParamsgetParams()XmlXContentGeneratorsetParams(XmlXParams params)voidusePrettyPrint()voidwriteFieldName(java.lang.String name)voidwriteRawField(java.lang.String fieldName, byte[] content, int offset, int length, java.io.OutputStream outputStream)voidwriteRawField(java.lang.String fieldName, byte[] content, java.io.OutputStream outputStream)voidwriteStartObject()voidwriteString(char[] text, int offset, int len)voidwriteString(java.lang.String text)voidwriteValue(org.xbib.content.XContentBuilder builder)-
Methods inherited from class org.xbib.content.core.AbstractXContentGenerator
setGenerator, writeArrayFieldStart, writeBinary, writeBinary, writeBinaryField, writeBoolean, writeBooleanField, writeEndArray, writeEndObject, writeNull, writeNullField, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectFieldStart, writeStartArray, writeStringField, writeUTF8String
-
-
-
-
Constructor Detail
-
XmlXContentGenerator
public XmlXContentGenerator(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator generator)
-
XmlXContentGenerator
public XmlXContentGenerator(com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator generator, XmlXParams params)
-
-
Method Detail
-
getParams
public XmlXParams getParams()
-
setParams
public XmlXContentGenerator setParams(XmlXParams params) throws java.io.IOException
- Throws:
java.io.IOException
-
content
public org.xbib.content.XContent content()
-
usePrettyPrint
public void usePrettyPrint()
-
writeStartObject
public void writeStartObject() throws java.io.IOException- Specified by:
writeStartObjectin interfaceorg.xbib.content.XContentGenerator- Overrides:
writeStartObjectin classorg.xbib.content.core.AbstractXContentGenerator- Throws:
java.io.IOException
-
writeFieldName
public void writeFieldName(java.lang.String name) throws java.io.IOException- Specified by:
writeFieldNamein interfaceorg.xbib.content.XContentGenerator- Overrides:
writeFieldNamein classorg.xbib.content.core.AbstractXContentGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.String text) throws java.io.IOException- Specified by:
writeStringin interfaceorg.xbib.content.XContentGenerator- Overrides:
writeStringin classorg.xbib.content.core.AbstractXContentGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeStringin interfaceorg.xbib.content.XContentGenerator- Overrides:
writeStringin classorg.xbib.content.core.AbstractXContentGenerator- Throws:
java.io.IOException
-
writeRawField
public void writeRawField(java.lang.String fieldName, byte[] content, java.io.OutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
writeRawField
public void writeRawField(java.lang.String fieldName, byte[] content, int offset, int length, java.io.OutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
writeValue
public void writeValue(org.xbib.content.XContentBuilder builder) throws java.io.IOException- Throws:
java.io.IOException
-
copy
public void copy(org.xbib.content.XContentBuilder builder, java.io.OutputStream outputStream) throws java.io.IOException- Throws:
java.io.IOException
-
copyCurrentStructure
public void copyCurrentStructure(org.xbib.content.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
-