This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading very large file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading very large file" Watch "Reading very large file" New topic
Author

Reading very large file

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Hello Friends,
I have to make a java program which reads data from a text file(about 10 mb in size), and than inserts that data into the database. Can i somehow make my code run faster?,
is java.nio.* faster than java.io.* ?
should i try using it?

plz advice


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Wander Mariano
Greenhorn

Joined: Apr 08, 2003
Posts: 1
http://www-106.ibm.com/developerworks/java/library/j-io2/
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
On the database side - not exactly what you asked about - look into batching your insert statements. The Statement interface has a couple methods to do with batching. Best of luck!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Reading very large file
 
Similar Threads
Loosing Object-Oriented Design points - URLyBird
Comparison of data types
August 25 Version of Dan Chisholm's Exam
Repaint and Mouse Motion
Lots of .nfs files being created