Class 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.AbstractXContentGenerator
    Content generator for XML formatted content.
    • Field Summary

      • Fields inherited from class org.xbib.content.core.AbstractXContentGenerator

        generator
    • 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
      void close()  
      org.xbib.content.XContent content()  
      void copy​(org.xbib.content.XContentBuilder builder, java.io.OutputStream outputStream)  
      void copyCurrentStructure​(org.xbib.content.XContentParser parser)  
      void flush()  
      XmlXParams getParams()  
      XmlXContentGenerator setParams​(XmlXParams params)  
      void usePrettyPrint()  
      void writeFieldName​(java.lang.String name)  
      void writeRawField​(java.lang.String fieldName, byte[] content, int offset, int length, java.io.OutputStream outputStream)  
      void writeRawField​(java.lang.String fieldName, byte[] content, java.io.OutputStream outputStream)  
      void writeStartObject()  
      void writeString​(char[] text, int offset, int len)  
      void writeString​(java.lang.String text)  
      void writeValue​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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

      • content

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

        public void usePrettyPrint()
      • writeStartObject

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

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

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

        public void writeString​(char[] text,
                                int offset,
                                int len)
                         throws java.io.IOException
        Specified by:
        writeString in interface org.xbib.content.XContentGenerator
        Overrides:
        writeString in class org.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