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, waitbinaryValue, contentType, currentName, currentToken, getTokenLocation, hasTextCharacters, nextToken, numberType, numberValue, objectBytes, objectText, skipChildren, text, textCharacters, textLength, textOffset, utf8Bytesclosepublic static final boolean DEFAULT_NUMBER_COEERCE_POLICY
public boolean isBooleanValue()
throws IOException
XContentParserisBooleanValue in interface XContentParserIOExceptionpublic boolean booleanValue()
throws IOException
booleanValue in interface XContentParserIOExceptionprotected abstract boolean doBooleanValue()
throws IOException
IOExceptionpublic short shortValue()
throws IOException
shortValue in interface XContentParserIOExceptionpublic short shortValue(boolean coerce)
throws IOException
shortValue in interface XContentParserIOExceptionprotected abstract short doShortValue()
throws IOException
IOExceptionpublic int intValue()
throws IOException
intValue in interface XContentParserIOExceptionpublic int intValue(boolean coerce)
throws IOException
intValue in interface XContentParserIOExceptionprotected abstract int doIntValue()
throws IOException
IOExceptionpublic long longValue()
throws IOException
longValue in interface XContentParserIOExceptionpublic long longValue(boolean coerce)
throws IOException
longValue in interface XContentParserIOExceptionprotected abstract long doLongValue()
throws IOException
IOExceptionpublic float floatValue()
throws IOException
floatValue in interface XContentParserIOExceptionpublic float floatValue(boolean coerce)
throws IOException
floatValue in interface XContentParserIOExceptionprotected abstract float doFloatValue()
throws IOException
IOExceptionpublic double doubleValue()
throws IOException
doubleValue in interface XContentParserIOExceptionpublic double doubleValue(boolean coerce)
throws IOException
doubleValue in interface XContentParserIOExceptionprotected abstract double doDoubleValue()
throws IOException
IOExceptionpublic final String textOrNull() throws IOException
textOrNull in interface XContentParserIOExceptionpublic org.apache.lucene.util.BytesRef utf8BytesOrNull()
throws IOException
XContentParserXContentParser.Token.VALUE_NULL.
This method should be used to read text only binary content should be read through XContentParser.binaryValue()utf8BytesOrNull in interface XContentParserIOExceptionpublic Map<String,Object> map() throws IOException
map in interface XContentParserIOExceptionpublic Map<String,Object> mapOrdered() throws IOException
mapOrdered in interface XContentParserIOExceptionpublic List<Object> list() throws IOException
list in interface XContentParserIOExceptionpublic List<Object> listOrderedMap() throws IOException
listOrderedMap in interface XContentParserIOExceptionpublic abstract boolean isClosed()
isClosed in interface XContentParserCopyright © 2009–2017. All rights reserved.