Help with parsing this text file

Associate
Joined
13 Jan 2007
Posts
2,424
Location
Belfast,Northern Ireland
http://pastebin.com/9gZWc91i

This is it but I don't quite understand whats going wrong. I seem to get a lot of out of bounds errors everytime. I assumed this was due to the charAt hitting a blank line but putting it in an if statement to check it wasn't empty didnt seem to help. Any ideas on how to fix this?

I basically have the data read in, based on the first character of each line I want my program to do something. For example in the code im just trying to do a counter until i have it working. In future if it reads in c then I know what to do based on how the data will be structured for that line.

E.G.
c12 1 0 0.0183903f
l13 44 32 9f
r14 44 33 0.0923171 $w=1.8e-07 $l=0.09 $layer=m1_par $X=25.575 $Y=-21.745
+ $X2=25.575 $Y2=-21.655

Different starting character requires different action
 
Back
Top Bottom