I am writing a small file processing application. It reads a file consisting of a set of lines each of which have the same format - say a
string followed by a number followed by a boolean (for example "this is a string" 123 true).
How can I process the file such that I get the String, int, boolean one after the other. I tried to use DataInputStream class and getLine method, but it returns the whole line. The class has methods to read primitive types but not String. Other File classes have read method, but that returns one byte at a time.
Thanks,
Naveen