public class JsonXContentParser extends AbstractXContentParser
XContentParser.NumberType, XContentParser.TokenDEFAULT_NUMBER_COERCE_POLICY| Constructor and Description |
|---|
JsonXContentParser(NamedXContentRegistry xContentRegistry,
com.fasterxml.jackson.core.JsonParser parser) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
binaryValue()
Reads a plain binary value that was written via one of the following methods:
XContentBuilder.field(String, org.apache.lucene.util.BytesRef)
XContentBuilder.field(String, org.elasticsearch.common.bytes.BytesReference)
XContentBuilder.field(String, byte[], int, int)}
XContentBuilder.field(String, byte[])}
as well as via their String variants of the separated value methods. |
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() |
org.apache.lucene.util.BytesRef |
utf8Bytes()
Returns a BytesRef holding UTF-8 bytes.
|
booleanValue, doubleValue, doubleValue, floatValue, floatValue, getXContentRegistry, intValue, intValue, isBooleanValue, list, listOrderedMap, longValue, longValue, map, mapOrdered, mapStrings, mapStringsOrdered, namedObject, shortValue, shortValue, textOrNull, utf8BytesOrNullpublic JsonXContentParser(NamedXContentRegistry xContentRegistry, 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 org.apache.lucene.util.BytesRef utf8Bytes()
throws java.io.IOException
XContentParserXContentParser.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
XContentParserXContentBuilder.field(String, org.apache.lucene.util.BytesRef)XContentBuilder.field(String, org.elasticsearch.common.bytes.BytesReference)XContentBuilder.field(String, byte[], int, int)}XContentBuilder.field(String, byte[])}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.IOExceptionpublic XContentLocation getTokenLocation()
XContentParserpublic void close()
public boolean isClosed()
isClosed in interface XContentParserisClosed in class AbstractXContentParser