This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Avoiding File Access Multiple Times. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Avoiding File Access Multiple Times." Watch "Avoiding File Access Multiple Times." New topic
Author

Avoiding File Access Multiple Times.

Nathan Heimdall
Greenhorn

Joined: Mar 02, 2009
Posts: 20
Hi,
I have a program which reads data from a file several times consecutively.

It accesses the same file each time for a different operation which is causing the program to run very slowly.

Is there any way I can avoid having to read it several times and get copy which I can access faster?

Thanks,

-Nathan
"A single conversation with a wise man is better than ten years of study."
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10747
    
    9

What type of file is it? What kind of data?
One way to do it is cache it in memory if possible.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Avoiding File Access Multiple Times.
 
It's not a secret anymore!