public abstract class AbstractXContentParser extends Object implements XContentParser
XContentParser.NumberType, XContentParser.Token
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_NUMBER_COEERCE_POLICY |
Constructor and Description |
---|
AbstractXContentParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue() |
protected abstract boolean |
doBooleanValue() |
protected abstract double |
doDoubleValue() |
protected abstract float |
doFloatValue() |
protected abstract int |
doIntValue() |
protected abstract long |
doLongValue() |
protected abstract short |
doShortValue() |
double |
doubleValue() |
double |
doubleValue(boolean coerce) |
float |
floatValue() |
float |
floatValue(boolean coerce) |
int |
intValue() |
int |
intValue(boolean coerce) |
boolean |
isBooleanValue()
returns true if the current value is boolean in nature.
|
abstract boolean |
isClosed() |
List<Object> |
list() |
List<Object> |
listOrderedMap() |
long |
longValue() |
long |
longValue(boolean coerce) |
Map<String,Object> |
map() |
Map<String,Object> |
mapOrdered() |
short |
shortValue() |
short |
shortValue(boolean coerce) |
String |
textOrNull() |
org.apache.lucene.util.BytesRef |
utf8BytesOrNull()
Returns a BytesRef holding UTF-8 bytes or null if a null value is
XContentParser.Token.VALUE_NULL . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
binaryValue, contentType, currentName, currentToken, getTokenLocation, hasTextCharacters, nextToken, numberType, numberValue, objectBytes, objectText, skipChildren, text, textCharacters, textLength, textOffset, utf8Bytes
close
public static final boolean DEFAULT_NUMBER_COEERCE_POLICY
public boolean isBooleanValue() throws IOException
XContentParser
isBooleanValue
in interface XContentParser
IOException
public boolean booleanValue() throws IOException
booleanValue
in interface XContentParser
IOException
protected abstract boolean doBooleanValue() throws IOException
IOException
public short shortValue() throws IOException
shortValue
in interface XContentParser
IOException
public short shortValue(boolean coerce) throws IOException
shortValue
in interface XContentParser
IOException
protected abstract short doShortValue() throws IOException
IOException
public int intValue() throws IOException
intValue
in interface XContentParser
IOException
public int intValue(boolean coerce) throws IOException
intValue
in interface XContentParser
IOException
protected abstract int doIntValue() throws IOException
IOException
public long longValue() throws IOException
longValue
in interface XContentParser
IOException
public long longValue(boolean coerce) throws IOException
longValue
in interface XContentParser
IOException
protected abstract long doLongValue() throws IOException
IOException
public float floatValue() throws IOException
floatValue
in interface XContentParser
IOException
public float floatValue(boolean coerce) throws IOException
floatValue
in interface XContentParser
IOException
protected abstract float doFloatValue() throws IOException
IOException
public double doubleValue() throws IOException
doubleValue
in interface XContentParser
IOException
public double doubleValue(boolean coerce) throws IOException
doubleValue
in interface XContentParser
IOException
protected abstract double doDoubleValue() throws IOException
IOException
public final String textOrNull() throws IOException
textOrNull
in interface XContentParser
IOException
public org.apache.lucene.util.BytesRef utf8BytesOrNull() throws IOException
XContentParser
XContentParser.Token.VALUE_NULL
.
This method should be used to read text only binary content should be read through XContentParser.binaryValue()
utf8BytesOrNull
in interface XContentParser
IOException
public Map<String,Object> map() throws IOException
map
in interface XContentParser
IOException
public Map<String,Object> mapOrdered() throws IOException
mapOrdered
in interface XContentParser
IOException
public List<Object> list() throws IOException
list
in interface XContentParser
IOException
public List<Object> listOrderedMap() throws IOException
listOrderedMap
in interface XContentParser
IOException
public abstract boolean isClosed()
isClosed
in interface XContentParser
Copyright © 2009–2016. All rights reserved.