Reading file contents into an array
Posted on 2006-04-17
Need some help reading a file with contents seperated by a "*" and placing it into an array.
Here is a snippet of the data in the file:
1000 ISLAND, SALAD DRSNG,LOCAL*1 TBSP*25
1000 ISLAND, SALAD DRSNG,REGLR*1 TBSP*60
100% NATURAL CEREAL *1 OZ*135
40% BRAN FLAKES, KELLOGG'S*1 OZ*90
Basically the Format is: food Descrip * serving size * calories
The twist is I also need to pull the food descrip and make a combo box for it.
I know i need to use StringTokenizer, but I am lost on how to access the file and use it.