public int[] readAllInts(){
  String[] fields=readAllStrings();
  int[] vals=new int[fields.length];
  for (int i=0; i < fields.length; i++)   vals[i]=Integer.parseInt(fields[i]);
  return vals;
}

public int [ ] readAllInts ( ) { String [ ] fields = readAllStrings ( ) ; int [ ] vals = new int [ fields . length ] ; for ( int i = 0 ; i < fields . length ; i ++ ) vals [ i ] = Integer . parseInt ( fields [ i ] ) ; return vals ; }
reads all remaining tokens from this input stream , parses them as integers , and returns them as an array of integers .
