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:
XContentParser
Direct Known Subclasses:
SmileXContentParser

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(org.elasticsearch.common.jackson.JsonParser parser)
           
 
Method Summary
 byte[] binaryValue()
           
 void close()
           
 XContentType contentType()
           
 java.lang.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()
           
 java.lang.Number numberValue()
           
 void skipChildren()
           
 java.lang.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, 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(org.elasticsearch.common.jackson.JsonParser parser)
Method Detail

contentType

public XContentType contentType()

nextToken

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

skipChildren

public void skipChildren()
                  throws java.io.IOException
Throws:
java.io.IOException

currentToken

public XContentParser.Token currentToken()

numberType

public XContentParser.NumberType numberType()
                                     throws java.io.IOException
Throws:
java.io.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 java.lang.String currentName()
                             throws java.io.IOException
Throws:
java.io.IOException

doBooleanValue

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

text

public java.lang.String text()
                      throws java.io.IOException
Throws:
java.io.IOException

hasTextCharacters

public boolean hasTextCharacters()

textCharacters

public char[] textCharacters()
                      throws java.io.IOException
Throws:
java.io.IOException

textLength

public int textLength()
               throws java.io.IOException
Throws:
java.io.IOException

textOffset

public int textOffset()
               throws java.io.IOException
Throws:
java.io.IOException

numberValue

public java.lang.Number numberValue()
                             throws java.io.IOException
Throws:
java.io.IOException

doShortValue

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

doIntValue

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

doLongValue

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

doFloatValue

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

doDoubleValue

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

binaryValue

public byte[] binaryValue()
                   throws java.io.IOException
Throws:
java.io.IOException

close

public void close()