The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

appending file

Posted by Nirmalya on September 14, 2000 at 1:43 AM

If you are accessing randomly Then do the following
try {
RandomAccessFile raf =
new RandomAccessFile("myfile.txt", "rw");
raf.skipBytes( (int)raf.length() );//you are at the end of file
raf.writeBytes(
"Whatever you want");
raf.close();
} catch (IOException ex ) {
ex.printStackTrace();
}

I think this will solve your purpose..




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us