public static Integer parserInteger ( JsonPullParser parser ) throws IOException , JsonFormatException { State eventType = parser . getEventType ( ) ; if ( eventType == State . VALUE_NULL ) { return null ; } else if ( eventType == State . VALUE_LONG ) { return ( int ) parser . getValueLong ( ) ; } else { throw new IllegalStateException ( "unexpected state. expected=VALUE_LONG, but get=" + eventType . toString ( ) ) ; } }
Parses the current token as an integer .