// Read space or comma-delimited file of integers
// Convert from ASCII to internal binary

...
BufferedReader in = new BufferedReader(new FileReader("C:\\temp\\foo.in" ) );
StreamTokenizer st = new StreamTokenizer(in);
// process the entire file, of space or comma-delimited ints
int found = StreamTokenizer.TT_NUMBER;
while ( found != StreamTokenizer.TT_EOF )
   {
   found = st.nextToken ();
   if ( found == StreamTokenizer.TT_NUMBER )
      {
      int i = (int)st.nval;
      out.println(i);
      } // end if
   } // end while