public class JsonXContentParser extends AbstractXContentParser
XContentParser.NumberType, XContentParser.Token
DEFAULT_NUMBER_COEERCE_POLICY
Constructor and Description |
---|
JsonXContentParser(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 XContentBuilderString variants of the separated value methods. |
void |
close() |
XContentType |
contentType() |
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() |
Number |
numberValue() |
Object |
objectBytes() |
Object |
objectText() |
void |
skipChildren() |
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, intValue, intValue, isBooleanValue, list, listOrderedMap, longValue, longValue, map, mapOrdered, shortValue, shortValue, textOrNull, utf8BytesOrNull
public JsonXContentParser(com.fasterxml.jackson.core.JsonParser parser)
public XContentType contentType()
public XContentParser.Token nextToken() throws IOException
IOException
public void skipChildren() throws IOException
IOException
public XContentParser.Token currentToken()
public XContentParser.NumberType numberType() throws IOException
IOException
public String currentName() throws IOException
IOException
protected boolean doBooleanValue() throws IOException
doBooleanValue
in class AbstractXContentParser
IOException
public String text() throws IOException
IOException
public org.apache.lucene.util.BytesRef utf8Bytes() throws IOException
XContentParser
XContentParser.binaryValue()
IOException
public Object objectText() throws IOException
IOException
public Object objectBytes() throws IOException
IOException
public boolean hasTextCharacters()
XContentParser
public char[] textCharacters() throws IOException
IOException
public int textLength() throws IOException
IOException
public int textOffset() throws IOException
IOException
public Number numberValue() throws IOException
IOException
public short doShortValue() throws IOException
doShortValue
in class AbstractXContentParser
IOException
public int doIntValue() throws IOException
doIntValue
in class AbstractXContentParser
IOException
public long doLongValue() throws IOException
doLongValue
in class AbstractXContentParser
IOException
public float doFloatValue() throws IOException
doFloatValue
in class AbstractXContentParser
IOException
public double doDoubleValue() throws IOException
doDoubleValue
in class AbstractXContentParser
IOException
public byte[] binaryValue() throws IOException
XContentParser
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[])
}XContentBuilderString
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:
IOException
public XContentLocation getTokenLocation()
XContentParser
public void close()
public boolean isClosed()
isClosed
in interface XContentParser
isClosed
in class AbstractXContentParser
Copyright © 2009–2016. All rights reserved.