org.elasticsearch.common.xcontent.json
Class JsonXContentParser

java.lang.Object
  extended by org.elasticsearch.common.xcontent.support.AbstractXContentParser
      extended by org.elasticsearch.common.xcontent.json.JsonXContentParser
All Implemented Interfaces:
Closeable, XContentParser
Direct Known Subclasses:
SmileXContentParser, YamlXContentParser

public class JsonXContentParser
extends AbstractXContentParser


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.XContentParser
XContentParser.NumberType, XContentParser.Token
 
Constructor Summary
JsonXContentParser(com.fasterxml.jackson.core.JsonParser parser)
           
 
Method Summary
 byte[] binaryValue()
           
 void close()
           
 XContentType contentType()
           
 String currentName()
           
 XContentParser.Token currentToken()
           
protected  boolean doBooleanValue()
           
 double doDoubleValue()
           
 float doFloatValue()
           
 int doIntValue()
           
 long doLongValue()
           
 short doShortValue()
           
 boolean estimatedNumberType()
          Is the number type estimated or not (i.e.
 boolean hasTextCharacters()
           
 XContentParser.Token nextToken()
           
 XContentParser.NumberType numberType()
           
 Number numberValue()
           
 void skipChildren()
           
 String text()
           
 char[] textCharacters()
           
 int textLength()
           
 int textOffset()
           
 
Methods inherited from class org.elasticsearch.common.xcontent.support.AbstractXContentParser
booleanValue, doubleValue, floatValue, intValue, longValue, map, mapAndClose, mapOrdered, mapOrderedAndClose, shortValue, textOrNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonXContentParser

public JsonXContentParser(com.fasterxml.jackson.core.JsonParser parser)
Method Detail

contentType

public XContentType contentType()

nextToken

public XContentParser.Token nextToken()
                               throws IOException
Throws:
IOException

skipChildren

public void skipChildren()
                  throws IOException
Throws:
IOException

currentToken

public XContentParser.Token currentToken()

numberType

public XContentParser.NumberType numberType()
                                     throws IOException
Throws:
IOException

estimatedNumberType

public boolean estimatedNumberType()
Description copied from interface: XContentParser
Is the number type estimated or not (i.e. an int might actually be a long, its just low enough to be an int).


currentName

public String currentName()
                   throws IOException
Throws:
IOException

doBooleanValue

protected boolean doBooleanValue()
                          throws IOException
Specified by:
doBooleanValue in class AbstractXContentParser
Throws:
IOException

text

public String text()
            throws IOException
Throws:
IOException

hasTextCharacters

public boolean hasTextCharacters()

textCharacters

public char[] textCharacters()
                      throws IOException
Throws:
IOException

textLength

public int textLength()
               throws IOException
Throws:
IOException

textOffset

public int textOffset()
               throws IOException
Throws:
IOException

numberValue

public Number numberValue()
                   throws IOException
Throws:
IOException

doShortValue

public short doShortValue()
                   throws IOException
Specified by:
doShortValue in class AbstractXContentParser
Throws:
IOException

doIntValue

public int doIntValue()
               throws IOException
Specified by:
doIntValue in class AbstractXContentParser
Throws:
IOException

doLongValue

public long doLongValue()
                 throws IOException
Specified by:
doLongValue in class AbstractXContentParser
Throws:
IOException

doFloatValue

public float doFloatValue()
                   throws IOException
Specified by:
doFloatValue in class AbstractXContentParser
Throws:
IOException

doDoubleValue

public double doDoubleValue()
                     throws IOException
Specified by:
doDoubleValue in class AbstractXContentParser
Throws:
IOException

binaryValue

public byte[] binaryValue()
                   throws IOException
Throws:
IOException

close

public void close()


Copyright © 2009-2012. All Rights Reserved.