It's not a secret anymore!
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Avoiding File Access Multiple Times." Watch "Avoiding File Access Multiple Times." New topic

Avoiding File Access Multiple Times.

Nathan Heimdall

Joined: Mar 02, 2009
Posts: 20
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?


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

Joined: Jul 26, 2007
Posts: 10745

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Avoiding File Access Multiple Times.
It's not a secret anymore!