public class JsonXContentParser extends AbstractXContentParser
XContentParser.NumberType, XContentParser.Token
DEFAULT_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, utf8BytesOrNull
public JsonXContentParser(NamedXContentRegistry xContentRegistry, 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 org.apache.lucene.util.BytesRef utf8Bytes() throws java.io.IOException
XContentParser
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
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[])
}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