This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes BufferedWriter error   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Java in General
Bookmark "BufferedWriter error   " Watch "BufferedWriter error   " New topic
Author

BufferedWriter error

Amar Naik
Ranch Hand

Joined: Sep 26, 2003
Posts: 43
the output of SQL query is around 19254 rows. But my below code writes only 18700 lines to o/p file. Sometimes the o/p file as 18900 rows. No idea why the file write is having error. It does not even throw any exception
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Anytime you write output to a file through a stream, make sure you close the stream when you are finished writing.
Amar Naik
Ranch Hand

Joined: Sep 26, 2003
Posts: 43
thanks. It solved the problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BufferedWriter error