java.io.Closeable, java.lang.AutoCloseable, XContentParserCborXContentParser, SmileXContentParser, YamlXContentParserpublic class JsonXContentParser extends AbstractXContentParser
XContentParser.NumberType, XContentParser.TokenDEFAULT_NUMBER_COERCE_POLICY| Constructor | Description |
|---|---|
JsonXContentParser(NamedXContentRegistry xContentRegistry,
DeprecationHandler deprecationHandler,
com.fasterxml.jackson.core.JsonParser parser) |
| Modifier and Type | Method | Description |
|---|---|---|
byte[] |
binaryValue() |
Reads a plain binary value that was written via one of the following methods:
XContentBuilder.field(String, byte[], int, int)}
XContentBuilder.field(String, byte[])}
as well as via their String variants of the separated value methods. |
java.nio.CharBuffer |
charBuffer() |
Returns a
CharBuffer holding UTF-8 bytes. |
void |
close() |
|
XContentType |
contentType() |
|
java.lang.String |
currentName() |
|
XContentParser.Token |
currentToken() |
|
protected boolean |
doBooleanValue() |
|
double |
doDoubleValue() |
|
float |
doFloatValue() |
|
int |
doIntValue() |
|
long |
doLongValue() |
|
short |
doShortValue() |
|
XContentLocation |
getTokenLocation() |
Used for error reporting to highlight where syntax errors occur in
content being parsed.
|
boolean |
hasTextCharacters() |
Method that can be used to determine whether calling of textCharacters() would be the most efficient way to
access textual content for the event parser currently points to.
|
boolean |
isClosed() |
|
XContentParser.Token |
nextToken() |
|
XContentParser.NumberType |
numberType() |
|
java.lang.Number |
numberValue() |
|
java.lang.Object |
objectBytes() |
|
java.lang.Object |
objectText() |
|
void |
skipChildren() |
|
java.lang.String |
text() |
|
char[] |
textCharacters() |
|
int |
textLength() |
|
int |
textOffset() |
booleanValue, booleanValueLenient, charBufferOrNull, doubleValue, doubleValue, floatValue, floatValue, getDeprecationHandler, getXContentRegistry, intValue, intValue, isBooleanValue, isBooleanValueLenient, list, listOrderedMap, longValue, longValue, map, mapOrdered, mapStrings, mapStringsOrdered, namedObject, shortValue, shortValue, textOrNullpublic JsonXContentParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, com.fasterxml.jackson.core.JsonParser parser)
public XContentType contentType()
public XContentParser.Token nextToken() throws java.io.IOException
java.io.IOExceptionpublic void skipChildren()
throws java.io.IOException
java.io.IOExceptionpublic XContentParser.Token currentToken()
public XContentParser.NumberType numberType() throws java.io.IOException
java.io.IOExceptionpublic java.lang.String currentName()
throws java.io.IOException
java.io.IOExceptionprotected boolean doBooleanValue()
throws java.io.IOException
doBooleanValue in class AbstractXContentParserjava.io.IOExceptionpublic java.lang.String text()
throws java.io.IOException
java.io.IOExceptionpublic java.nio.CharBuffer charBuffer()
throws java.io.IOException
XContentParserCharBuffer holding UTF-8 bytes.
This method should be used to read text only binary content should be read through XContentParser.binaryValue()java.io.IOExceptionpublic java.lang.Object objectText()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object objectBytes()
throws java.io.IOException
java.io.IOExceptionpublic boolean hasTextCharacters()
XContentParserpublic char[] textCharacters()
throws java.io.IOException
java.io.IOExceptionpublic int textLength()
throws java.io.IOException
java.io.IOExceptionpublic int textOffset()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Number numberValue()
throws java.io.IOException
java.io.IOExceptionpublic short doShortValue()
throws java.io.IOException
doShortValue in class AbstractXContentParserjava.io.IOExceptionpublic int doIntValue()
throws java.io.IOException
doIntValue in class AbstractXContentParserjava.io.IOExceptionpublic long doLongValue()
throws java.io.IOException
doLongValue in class AbstractXContentParserjava.io.IOExceptionpublic float doFloatValue()
throws java.io.IOException
doFloatValue in class AbstractXContentParserjava.io.IOExceptionpublic double doDoubleValue()
throws java.io.IOException
doDoubleValue in class AbstractXContentParserjava.io.IOExceptionpublic byte[] binaryValue()
throws java.io.IOException
XContentParserString variants of the separated value methods.
Note: Do not use this method to read values written with:
these methods write UTF-8 encoded strings and must be read through:
java.io.IOExceptionpublic XContentLocation getTokenLocation()
XContentParserpublic void close()
public boolean isClosed()
isClosed in interface XContentParserisClosed in class AbstractXContentParser