Thursday, February 05, 2009

Opening the same file for reading and writing

You can open the same file for reading as well as reading in Java using RandomAccessFile class. RandomAccessFile class supports simultanous reading and writing from/to the same file if you open the file in "rw" mode:
RandomAccessFile raf = new RandomAccessFile("filename.txt", "rw");

source : java-tips.org

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory