-
Method Summary
Modifier and Type |
Method |
Description |
XContentType |
contentType() |
|
default void |
copyCurrentEvent(XContentParser parser) |
|
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 |
writeNumber(java.math.BigDecimal value) |
|
void |
writeNumber(java.math.BigInteger 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 |
writeNumberField(java.lang.String name,
java.math.BigDecimal value) |
|
void |
writeNumberField(java.lang.String name,
java.math.BigInteger value) |
|
void |
writeRawField(java.lang.String name,
java.io.InputStream value) |
Deprecated.
|
void |
writeRawField(java.lang.String name,
java.io.InputStream value,
XContentType xContentType) |
Writes a raw field with the value taken from the bytes in the stream
|
void |
writeRawValue(java.io.InputStream value,
XContentType xContentType) |
Writes a raw value taken from the bytes in the stream
|
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) |
|
Methods inherited from interface java.io.Closeable
close
Methods inherited from interface java.io.Flushable
flush
-
Method Details
-
-
-
-
void usePrintLineFeedAtEnd()
-
void writeStartObject()
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeEndObject()
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeStartArray()
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeEndArray()
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeFieldName(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNull()
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNullField(java.lang.String name)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeBooleanField(java.lang.String name,
boolean value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeBoolean(boolean value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
double value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(double value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
float value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(float value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
int value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(int value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
long value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(long value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(short value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(java.math.BigInteger value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
java.math.BigInteger value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumber(java.math.BigDecimal value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeNumberField(java.lang.String name,
java.math.BigDecimal value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeStringField(java.lang.String name,
java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeString(java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeString(char[] text,
int offset,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeUTF8String(byte[] value,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeBinaryField(java.lang.String name,
byte[] value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeBinary(byte[] value)
throws java.io.IOException
- Throws:
java.io.IOException
-
void writeBinary(byte[] value,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
-
@Deprecated
void writeRawField(java.lang.String name,
java.io.InputStream value)
throws java.io.IOException
Deprecated.
Writes a raw field with the value taken from the bytes in the stream
- Throws:
java.io.IOException
-
void writeRawField(
java.lang.String name,
java.io.InputStream value,
XContentType xContentType)
throws
java.io.IOException
Writes a raw field with the value taken from the bytes in the stream
- Throws:
java.io.IOException
-
void writeRawValue(
java.io.InputStream value,
XContentType xContentType)
throws
java.io.IOException
Writes a raw value taken from the bytes in the stream
- Throws:
java.io.IOException
-
void copyCurrentStructure(
XContentParser parser)
throws
java.io.IOException
- Throws:
java.io.IOException
-
default void copyCurrentEvent(
XContentParser parser)
throws
java.io.IOException
- Throws:
java.io.IOException
-
boolean isClosed()
Returns true
if this XContentGenerator has been closed. A closed generator can not do any more output.