protected int parseInt() throws IOException {
  int sign=1;
  int value=0;
  int ch=skipWhitespace();
  if (ch == '+')   ch=read();
 else   if (ch == '-') {
    sign=-1;
    ch=read();
  }
  for (; ch >= '0' && ch <= '9'; ch=read())   value=10 * value + ch - '0';
  peek=ch;
  return sign * value;
}

protected int parseInt ( ) throws IOException { int sign = 1 ; int value = 0 ; int ch = skipWhitespace ( ) ; if ( ch == '+' ) ch = read ( ) ; else if ( ch == '-' ) { sign = - 1 ; ch = read ( ) ; } for ( ; ch >= '0' && ch <= '9' ; ch = read ( ) ) value = 10 * value + ch - '0' ; peek = ch ; return sign * value ; }
parses an integer value from the stream .
