Class XmlXContentGenerator

java.lang.Object
org.xbib.content.core.AbstractXContentGenerator
org.xbib.content.xml.XmlXContentGenerator
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, org.xbib.content.XContentGenerator

public class XmlXContentGenerator extends org.xbib.content.core.AbstractXContentGenerator
Content generator for XML formatted content.
  • Constructor Details

    • 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 Details

    • getParams

      public XmlXParams getParams()
    • setParams

      public XmlXContentGenerator setParams(XmlXParams params) throws IOException
      Throws:
      IOException
    • content

      public org.xbib.content.XContent content()
    • usePrettyPrint

      public void usePrettyPrint()
    • writeStartObject

      public void writeStartObject() throws IOException
      Specified by:
      writeStartObject in interface org.xbib.content.XContentGenerator
      Overrides:
      writeStartObject in class org.xbib.content.core.AbstractXContentGenerator
      Throws:
      IOException
    • writeFieldName

      public void writeFieldName(String name) throws IOException
      Specified by:
      writeFieldName in interface org.xbib.content.XContentGenerator
      Overrides:
      writeFieldName in class org.xbib.content.core.AbstractXContentGenerator
      Throws:
      IOException
    • writeString

      public void writeString(String text) throws IOException
      Specified by:
      writeString in interface org.xbib.content.XContentGenerator
      Overrides:
      writeString in class org.xbib.content.core.AbstractXContentGenerator
      Throws:
      IOException
    • writeString

      public void writeString(char[] text, int offset, int len) throws IOException
      Specified by:
      writeString in interface org.xbib.content.XContentGenerator
      Overrides:
      writeString in class org.xbib.content.core.AbstractXContentGenerator
      Throws:
      IOException
    • writeRawField

      public void writeRawField(String fieldName, byte[] content, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • writeRawField

      public void writeRawField(String fieldName, byte[] content, int offset, int length, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • writeValue

      public void writeValue(org.xbib.content.XContentBuilder builder) throws IOException
      Throws:
      IOException
    • copy

      public void copy(org.xbib.content.XContentBuilder builder, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • copyCurrentStructure

      public void copyCurrentStructure(org.xbib.content.XContentParser parser) throws IOException
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Throws:
      IOException