java.io.Closeable
, java.lang.AutoCloseable
, XContentParser
CborXContentParser
, SmileXContentParser
, YamlXContentParser
public class JsonXContentParser extends AbstractXContentParser
XContentParser.NumberType, XContentParser.Token
DEFAULT_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, textOrNull
public JsonXContentParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, com.fasterxml.jackson.core.JsonParser parser)
public XContentType contentType()
public XContentParser.Token nextToken() throws java.io.IOException
java.io.IOException
public void skipChildren() throws java.io.IOException
java.io.IOException
public XContentParser.Token currentToken()
public XContentParser.NumberType numberType() throws java.io.IOException
java.io.IOException
public java.lang.String currentName() throws java.io.IOException
java.io.IOException
protected boolean doBooleanValue() throws java.io.IOException
doBooleanValue
in class AbstractXContentParser
java.io.IOException
public java.lang.String text() throws java.io.IOException
java.io.IOException
public java.nio.CharBuffer charBuffer() throws java.io.IOException
XContentParser
CharBuffer
holding UTF-8 bytes.
This method should be used to read text only binary content should be read through XContentParser.binaryValue()
java.io.IOException
public java.lang.Object objectText() throws java.io.IOException
java.io.IOException
public java.lang.Object objectBytes() throws java.io.IOException
java.io.IOException
public boolean hasTextCharacters()
XContentParser
public char[] textCharacters() throws java.io.IOException
java.io.IOException
public int textLength() throws java.io.IOException
java.io.IOException
public int textOffset() throws java.io.IOException
java.io.IOException
public java.lang.Number numberValue() throws java.io.IOException
java.io.IOException
public short doShortValue() throws java.io.IOException
doShortValue
in class AbstractXContentParser
java.io.IOException
public int doIntValue() throws java.io.IOException
doIntValue
in class AbstractXContentParser
java.io.IOException
public long doLongValue() throws java.io.IOException
doLongValue
in class AbstractXContentParser
java.io.IOException
public float doFloatValue() throws java.io.IOException
doFloatValue
in class AbstractXContentParser
java.io.IOException
public double doDoubleValue() throws java.io.IOException
doDoubleValue
in class AbstractXContentParser
java.io.IOException
public byte[] binaryValue() throws java.io.IOException
XContentParser
String
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.IOException
public XContentLocation getTokenLocation()
XContentParser
public void close()
public boolean isClosed()
isClosed
in interface XContentParser
isClosed
in class AbstractXContentParser