| Author |
First line of file
|
Angus Ferguson
Ranch Hand
Joined: Jun 22, 2012
Posts: 246
|
|
Hi,
I am reading form a .data file but it only seems to be reading the first line of the code when I in more than the next code in the loop
It works well in the example but if I in in the loop something like
it only reads the first line
Any idea?
Thanks
|
 |
Tony Docherty
Bartender
Joined: Aug 07, 2007
Posts: 1169
|
|
|
I suggest you read the AvailableDoesntDoWhatYouThinkItDoes FAQ
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Also, you can't call dis.readLine() twice while still expecting the same line to be returned. Any method that reads part of a file (or InputStream or Reader) moves forward in the file (or InputStream or Reader). Anything that was just read won't be re-read again unless you use the mark / reset method pair.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: First line of file
|
|
|