This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding EOF  RSS feed

 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I m reading a file using buffereader, code looks like --->
BufferedReaderbr= new BufferedReader(FILE);
while(br.readLine()) != null )
{
//something
}

My problem is user is uploading file which contains many empty rows in between filled rows.
So I may need to modify condition like
while(br.readLine()) != EndOfFile )
But I couldn't locate any function like this.
Can anybody suggest any alternative ?
Thanks in advance.
Varun.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I searched old archieves and got the solution.
Thanks. :-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!