Java has no built-in methods for reading data of the form: 123 456,-4.
You have to roll your own method. Use java.io.StreamTokenizer or java.util.StringTokenizer, perhaps in combination with readLine to get your data into strings. StreamTokenizer has bells and whistles to deal with parsing source code, including white space, comments and numbers. StringTokenizer just splits the text up based on delimiter characters. Then use the conversion methods in the conversion table to convert to integers etc.
This page is posted |
http://mindprod.com/jgloss/streamtokenizer.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\streamtokenizer.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.118.255.51] |
| |
Feedback |
You are visitor number | |