protected long _convertNumberToLong(Number n) throws IOException { if (n instanceof BigInteger) { BigInteger big = (BigInteger) n; if (BI_MIN_LONG.compareTo(big) > 0 || BI_MAX_LONG.compareTo(big) < 0) { reportOverflowLong(); } } else if ((n instanceof Double) || (n instanceof Float)) { double d = n.doubleValue(); // Need to check boundaries if (d < MIN_LONG_D || d > MAX_LONG_D) { reportOverflowLong(); } return (long) d; } else if (n instanceof BigDecimal) { BigDecimal big = (BigDecimal) n; if (BD_MIN_LONG.compareTo(big) > 0 || BD_MAX_LONG.compareTo(big) < 0) { reportOverflowLong(); } } else { _throwInternal(); } return n.longValue(); }
protected long _convertNumberToLong(Number n) throws IOException { if (n instanceof BigInteger) { BigInteger big = (BigInteger) n; if (BI_MIN_LONG.compareTo(big) > 0 || BI_MAX_LONG.compareTo(big) < 0) { reportOverflowLong(); } } else if ((n instanceof Double) || (n instanceof Float)) { double d = n.doubleValue(); // Need to check boundaries if (d < MIN_LONG_D || d > MAX_LONG_D) { reportOverflowLong(); } return (long) d; } else if (n instanceof BigDecimal) { BigDecimal big = (BigDecimal) n; if (BD_MIN_LONG.compareTo(big) > 0 || BD_MAX_LONG.compareTo(big) < 0) { reportOverflowLong(); } } else { _throwInternal(); } return n.longValue(); }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }
@Override protected void _handleEOF() throws JsonParseException { _throwInternal(); } }