*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading very large file