private int readExp ( CharArr arr , int lim ) throws IOException { nstate |= HAS_EXPONENT ; int ch = getChar ( ) ; lim -- ; if ( ch == ' ' || ch == ' ' ) { arr . write ( ch ) ; ch = getChar ( ) ; lim -- ; } // make sure at least one digit is read. if ( ch < ' ' || ch > ' ' ) { throw err ( "missing exponent number" ) ; } arr . write ( ch ) ; return readExpDigits ( arr , lim ) ; }
call after e or E has been seen to read the rest of the exponent