IonParser extends ParserMinimalBase { @Override public NumberType getNumberType() throws IOException { IonType type = _reader.getType(); if (type != null) { switch (type) { case DECIMAL: return NumberType.BIG_DECIMAL; case INT: IntegerSize size = _reader.getIntegerSize(); switch (size) { case INT: return NumberType.INT; case LONG: return NumberType.LONG; default: return NumberType.BIG_INTEGER; } case FLOAT: return NumberType.DOUBLE; default: } } return null; } IonParser(ObjectReadContext readCtxt, IOContext ioCtxt,
            int parserFeatures, IonReader r, IonSystem system); @Override Version version(); @Override JacksonFeatureSet<StreamReadCapability> getReadCapabilities(); @Override boolean isClosed(); @Override void close(); @Override IonReader getInputSource(); @Override boolean hasTextCharacters(); @Override String getText(); @Override char[] getTextCharacters(); @Override int getTextLength(); @Override int getTextOffset(); @Override BigInteger getBigIntegerValue(); @Override BigDecimal getDecimalValue(); @Override double getDoubleValue(); @Override float getFloatValue(); @Override int getIntValue(); @Override long getLongValue(); @Override NumberType getNumberType(); @Override Number getNumberValue(); @Override final Number getNumberValueExact(); @Override boolean isNaN(); @Override byte[] getBinaryValue(Base64Variant arg0); @Override Object getEmbeddedObject(); @Override JsonLocation getCurrentLocation(); @Override String currentName(); @Override TokenStreamContext getParsingContext(); @Override void setCurrentValue(Object v); @Override Object getCurrentValue(); @Override JsonLocation getTokenLocation(); @Override JsonToken nextToken(); String[] getTypeAnnotations(); @Override JsonParser skipChildren();  }
@Test public void testFloatType() throws IOException { final ObjectReadContext ctxt = ObjectReadContext.empty(); final byte[] data = "{ score:0.291e0 }".getBytes(); IonSystem ion = IonSystemBuilder.standard().build(); final IonValue ionFloat = ion.newFloat(Float.MAX_VALUE); IonReader reader = ionFloat.getSystem().newReader(data, 0, data.length); reader.next(); reader.stepIn(); reader.next(); final IonParser floatParser = ionFactory.createParser(ctxt, reader); Assert.assertEquals(JsonParser.NumberType.DOUBLE, floatParser.getNumberType()); }