org.elasticsearch.common.xcontent
Interface XContentGenerator

All Known Implementing Classes:
AbstractXContentGenerator, JsonXContentGenerator, SmileXContentGenerator, YamlXContentGenerator

public interface XContentGenerator


Method Summary
 void close()
           
 XContentType contentType()
           
 void copyCurrentStructure(XContentParser parser)
           
 void flush()
           
 void usePrettyPrint()
           
 void writeArrayFieldStart(String fieldName)
           
 void writeArrayFieldStart(XContentString fieldName)
           
 void writeBinary(byte[] data)
           
 void writeBinary(byte[] data, int offset, int len)
           
 void writeBinaryField(String fieldName, byte[] data)
           
 void writeBinaryField(XContentString fieldName, byte[] data)
           
 void writeBoolean(boolean state)
           
 void writeBooleanField(String fieldName, boolean value)
           
 void writeBooleanField(XContentString fieldName, boolean value)
           
 void writeEndArray()
           
 void writeEndObject()
           
 void writeFieldName(String name)
           
 void writeFieldName(XContentString name)
           
 void writeNull()
           
 void writeNullField(String fieldName)
           
 void writeNullField(XContentString fieldName)
           
 void writeNumber(double d)
           
 void writeNumber(float f)
           
 void writeNumber(int v)
           
 void writeNumber(long v)
           
 void writeNumberField(String fieldName, double value)
           
 void writeNumberField(String fieldName, float value)
           
 void writeNumberField(String fieldName, int value)
           
 void writeNumberField(String fieldName, long value)
           
 void writeNumberField(XContentString fieldName, double value)
           
 void writeNumberField(XContentString fieldName, float value)
           
 void writeNumberField(XContentString fieldName, int value)
           
 void writeNumberField(XContentString fieldName, long value)
           
 void writeObjectFieldStart(String fieldName)
           
 void writeObjectFieldStart(XContentString fieldName)
           
 void writeRawField(String fieldName, byte[] content, int offset, int length, OutputStream bos)
           
 void writeRawField(String fieldName, byte[] content, OutputStream bos)
           
 void writeRawField(String fieldName, BytesReference content, OutputStream bos)
           
 void writeRawField(String fieldName, InputStream content, OutputStream bos)
           
 void writeStartArray()
           
 void writeStartObject()
           
 void writeString(char[] text, int offset, int len)
           
 void writeString(String text)
           
 void writeStringField(String fieldName, String value)
           
 void writeStringField(XContentString fieldName, String value)
           
 void writeUTF8String(byte[] text, int offset, int length)
           
 

Method Detail

contentType

XContentType contentType()

usePrettyPrint

void usePrettyPrint()

writeStartArray

void writeStartArray()
                     throws IOException
Throws:
IOException

writeEndArray

void writeEndArray()
                   throws IOException
Throws:
IOException

writeStartObject

void writeStartObject()
                      throws IOException
Throws:
IOException

writeEndObject

void writeEndObject()
                    throws IOException
Throws:
IOException

writeFieldName

void writeFieldName(String name)
                    throws IOException
Throws:
IOException

writeFieldName

void writeFieldName(XContentString name)
                    throws IOException
Throws:
IOException

writeString

void writeString(String text)
                 throws IOException
Throws:
IOException

writeString

void writeString(char[] text,
                 int offset,
                 int len)
                 throws IOException
Throws:
IOException

writeUTF8String

void writeUTF8String(byte[] text,
                     int offset,
                     int length)
                     throws IOException
Throws:
IOException

writeBinary

void writeBinary(byte[] data,
                 int offset,
                 int len)
                 throws IOException
Throws:
IOException

writeBinary

void writeBinary(byte[] data)
                 throws IOException
Throws:
IOException

writeNumber

void writeNumber(int v)
                 throws IOException
Throws:
IOException

writeNumber

void writeNumber(long v)
                 throws IOException
Throws:
IOException

writeNumber

void writeNumber(double d)
                 throws IOException
Throws:
IOException

writeNumber

void writeNumber(float f)
                 throws IOException
Throws:
IOException

writeBoolean

void writeBoolean(boolean state)
                  throws IOException
Throws:
IOException

writeNull

void writeNull()
               throws IOException
Throws:
IOException

writeStringField

void writeStringField(String fieldName,
                      String value)
                      throws IOException
Throws:
IOException

writeStringField

void writeStringField(XContentString fieldName,
                      String value)
                      throws IOException
Throws:
IOException

writeBooleanField

void writeBooleanField(String fieldName,
                       boolean value)
                       throws IOException
Throws:
IOException

writeBooleanField

void writeBooleanField(XContentString fieldName,
                       boolean value)
                       throws IOException
Throws:
IOException

writeNullField

void writeNullField(String fieldName)
                    throws IOException
Throws:
IOException

writeNullField

void writeNullField(XContentString fieldName)
                    throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(String fieldName,
                      int value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(XContentString fieldName,
                      int value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(String fieldName,
                      long value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(XContentString fieldName,
                      long value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(String fieldName,
                      double value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(XContentString fieldName,
                      double value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(String fieldName,
                      float value)
                      throws IOException
Throws:
IOException

writeNumberField

void writeNumberField(XContentString fieldName,
                      float value)
                      throws IOException
Throws:
IOException

writeBinaryField

void writeBinaryField(String fieldName,
                      byte[] data)
                      throws IOException
Throws:
IOException

writeBinaryField

void writeBinaryField(XContentString fieldName,
                      byte[] data)
                      throws IOException
Throws:
IOException

writeArrayFieldStart

void writeArrayFieldStart(String fieldName)
                          throws IOException
Throws:
IOException

writeArrayFieldStart

void writeArrayFieldStart(XContentString fieldName)
                          throws IOException
Throws:
IOException

writeObjectFieldStart

void writeObjectFieldStart(String fieldName)
                           throws IOException
Throws:
IOException

writeObjectFieldStart

void writeObjectFieldStart(XContentString fieldName)
                           throws IOException
Throws:
IOException

writeRawField

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

writeRawField

void writeRawField(String fieldName,
                   byte[] content,
                   int offset,
                   int length,
                   OutputStream bos)
                   throws IOException
Throws:
IOException

writeRawField

void writeRawField(String fieldName,
                   InputStream content,
                   OutputStream bos)
                   throws IOException
Throws:
IOException

writeRawField

void writeRawField(String fieldName,
                   BytesReference content,
                   OutputStream bos)
                   throws IOException
Throws:
IOException

copyCurrentStructure

void copyCurrentStructure(XContentParser parser)
                          throws IOException
Throws:
IOException

flush

void flush()
           throws IOException
Throws:
IOException

close

void close()
           throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.