public interface XContentGenerator
extends java.io.Closeable, java.io.Flushable
Modifier and Type | Method and Description |
---|---|
XContentType |
contentType() |
void |
copyCurrentStructure(XContentParser parser) |
boolean |
isClosed()
Returns
true if this XContentGenerator has been closed. |
boolean |
isPrettyPrint() |
void |
usePrettyPrint() |
void |
usePrintLineFeedAtEnd() |
void |
writeBinary(byte[] value) |
void |
writeBinary(byte[] value,
int offset,
int length) |
void |
writeBinaryField(java.lang.String name,
byte[] value) |
void |
writeBoolean(boolean value) |
void |
writeBooleanField(java.lang.String name,
boolean value) |
void |
writeEndArray() |
void |
writeEndObject() |
void |
writeFieldName(java.lang.String name) |
void |
writeNull() |
void |
writeNullField(java.lang.String name) |
void |
writeNumber(double value) |
void |
writeNumber(float value) |
void |
writeNumber(int value) |
void |
writeNumber(long value) |
void |
writeNumber(short value) |
void |
writeNumberField(java.lang.String name,
double value) |
void |
writeNumberField(java.lang.String name,
float value) |
void |
writeNumberField(java.lang.String name,
int value) |
void |
writeNumberField(java.lang.String name,
long value) |
void |
writeRawField(java.lang.String name,
BytesReference value) |
void |
writeRawField(java.lang.String name,
java.io.InputStream value) |
void |
writeRawValue(BytesReference value) |
void |
writeStartArray() |
void |
writeStartObject() |
void |
writeString(char[] text,
int offset,
int len) |
void |
writeString(java.lang.String value) |
void |
writeStringField(java.lang.String name,
java.lang.String value) |
void |
writeUTF8String(byte[] value,
int offset,
int length) |
XContentType contentType()
void usePrettyPrint()
boolean isPrettyPrint()
void usePrintLineFeedAtEnd()
void writeStartObject() throws java.io.IOException
java.io.IOException
void writeEndObject() throws java.io.IOException
java.io.IOException
void writeStartArray() throws java.io.IOException
java.io.IOException
void writeEndArray() throws java.io.IOException
java.io.IOException
void writeFieldName(java.lang.String name) throws java.io.IOException
java.io.IOException
void writeNull() throws java.io.IOException
java.io.IOException
void writeNullField(java.lang.String name) throws java.io.IOException
java.io.IOException
void writeBooleanField(java.lang.String name, boolean value) throws java.io.IOException
java.io.IOException
void writeBoolean(boolean value) throws java.io.IOException
java.io.IOException
void writeNumberField(java.lang.String name, double value) throws java.io.IOException
java.io.IOException
void writeNumber(double value) throws java.io.IOException
java.io.IOException
void writeNumberField(java.lang.String name, float value) throws java.io.IOException
java.io.IOException
void writeNumber(float value) throws java.io.IOException
java.io.IOException
void writeNumberField(java.lang.String name, int value) throws java.io.IOException
java.io.IOException
void writeNumber(int value) throws java.io.IOException
java.io.IOException
void writeNumberField(java.lang.String name, long value) throws java.io.IOException
java.io.IOException
void writeNumber(long value) throws java.io.IOException
java.io.IOException
void writeNumber(short value) throws java.io.IOException
java.io.IOException
void writeStringField(java.lang.String name, java.lang.String value) throws java.io.IOException
java.io.IOException
void writeString(java.lang.String value) throws java.io.IOException
java.io.IOException
void writeString(char[] text, int offset, int len) throws java.io.IOException
java.io.IOException
void writeUTF8String(byte[] value, int offset, int length) throws java.io.IOException
java.io.IOException
void writeBinaryField(java.lang.String name, byte[] value) throws java.io.IOException
java.io.IOException
void writeBinary(byte[] value) throws java.io.IOException
java.io.IOException
void writeBinary(byte[] value, int offset, int length) throws java.io.IOException
java.io.IOException
void writeRawField(java.lang.String name, java.io.InputStream value) throws java.io.IOException
java.io.IOException
void writeRawField(java.lang.String name, BytesReference value) throws java.io.IOException
java.io.IOException
void writeRawValue(BytesReference value) throws java.io.IOException
java.io.IOException
void copyCurrentStructure(XContentParser parser) throws java.io.IOException
java.io.IOException
boolean isClosed()
true
if this XContentGenerator has been closed. A closed generator can not do any more output.