This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading lines in nio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading lines in nio" Watch "Reading lines in nio" New topic
Author

Reading lines in nio

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Hello Friends,
I am trying to develop a Java Program using java.nio., this programs simply reads a text file and prints one line at a time on the screen as well as on another file, a.txt. My problem is i am getting empty spaces being printed on screen and some unreadable characters written on a.txt.

Plz help



Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
 
jQuery in Action, 2nd edition
 
subject: Reading lines in nio