File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes My program is not reading the first Line of a text file..What could be the issue: Here is the code: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "My program is not reading the first Line of a text file..What could be the issue: Here is the code:" Watch "My program is not reading the first Line of a text file..What could be the issue: Here is the code:" New topic
Author

My program is not reading the first Line of a text file..What could be the issue: Here is the code:

Stanley Mungai
Ranch Hand

Joined: Dec 09, 2011
Posts: 155



Give a beggar a fish; feed him for a day. Teach him how to fish; Feed him for a lifetime.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14278
    
  21

Welcome to the Ranch.

Can you please explain in more detail what the problem is?

Note that in line 38-40 you are skipping the first 4 lines of the file you are reading.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Stanley Mungai
Ranch Hand

Joined: Dec 09, 2011
Posts: 155

Jesper de Jong wrote:Welcome to the Ranch.

Can you please explain in more detail what the problem is?

Note that in line 38-40 you are skipping the first 4 lines of the file you are reading.


Thank you for the reply..I am converting a Text File an e-statement To pdf. The first Few lines are the header and even there the first Line is getting skipped. The loop at line 38-40 is for reading a particular line(the account number) so that I can use the first two and the Last two digits as the password for the Pdf Document. The document is converting fine But the account number which is the 5th Line is not being read by the program. In the other loop at 97-99, the program is not reading a line (line number 20). I hope I have made myself clear this time. I am reading sections of the text File and everytime I read a certain section, the first Line of that section is getting Skipped. For example the details of the e-statement start from line 20. Please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My program is not reading the first Line of a text file..What could be the issue: Here is the code: