public interface XContentGenerator extends Closeable
XContentType contentType()
void usePrettyPrint()
void usePrintLineFeedAtEnd()
void writeStartArray()
throws IOException
IOExceptionvoid writeEndArray()
throws IOException
IOExceptionvoid writeStartObject()
throws IOException
IOExceptionvoid writeEndObject()
throws IOException
IOExceptionvoid writeFieldName(String name) throws IOException
IOExceptionvoid writeFieldName(XContentString name) throws IOException
IOExceptionvoid writeString(String text) throws IOException
IOExceptionvoid writeString(char[] text,
int offset,
int len)
throws IOException
IOExceptionvoid writeUTF8String(byte[] text,
int offset,
int length)
throws IOException
IOExceptionvoid writeBinary(byte[] data,
int offset,
int len)
throws IOException
IOExceptionvoid writeBinary(byte[] data)
throws IOException
IOExceptionvoid writeNumber(int v)
throws IOException
IOExceptionvoid writeNumber(long v)
throws IOException
IOExceptionvoid writeNumber(double d)
throws IOException
IOExceptionvoid writeNumber(float f)
throws IOException
IOExceptionvoid writeBoolean(boolean state)
throws IOException
IOExceptionvoid writeNull()
throws IOException
IOExceptionvoid writeStringField(String fieldName, String value) throws IOException
IOExceptionvoid writeStringField(XContentString fieldName, String value) throws IOException
IOExceptionvoid writeBooleanField(String fieldName, boolean value) throws IOException
IOExceptionvoid writeBooleanField(XContentString fieldName, boolean value) throws IOException
IOExceptionvoid writeNullField(String fieldName) throws IOException
IOExceptionvoid writeNullField(XContentString fieldName) throws IOException
IOExceptionvoid writeNumberField(String fieldName, int value) throws IOException
IOExceptionvoid writeNumberField(XContentString fieldName, int value) throws IOException
IOExceptionvoid writeNumberField(String fieldName, long value) throws IOException
IOExceptionvoid writeNumberField(XContentString fieldName, long value) throws IOException
IOExceptionvoid writeNumberField(String fieldName, double value) throws IOException
IOExceptionvoid writeNumberField(XContentString fieldName, double value) throws IOException
IOExceptionvoid writeNumberField(String fieldName, float value) throws IOException
IOExceptionvoid writeNumberField(XContentString fieldName, float value) throws IOException
IOExceptionvoid writeBinaryField(String fieldName, byte[] data) throws IOException
IOExceptionvoid writeBinaryField(XContentString fieldName, byte[] data) throws IOException
IOExceptionvoid writeArrayFieldStart(String fieldName) throws IOException
IOExceptionvoid writeArrayFieldStart(XContentString fieldName) throws IOException
IOExceptionvoid writeObjectFieldStart(String fieldName) throws IOException
IOExceptionvoid writeObjectFieldStart(XContentString fieldName) throws IOException
IOExceptionvoid writeRawField(String fieldName, InputStream content) throws IOException
IOExceptionvoid writeRawField(String fieldName, BytesReference content) throws IOException
IOExceptionvoid writeRawValue(BytesReference content) throws IOException
IOExceptionvoid copyCurrentStructure(XContentParser parser) throws IOException
IOExceptionvoid flush()
throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.