The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 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:

Yes. There is!!

Posted by Vijay. on October 05, 2000 at 3:15 PM

Hi,

You can either do this :

RandomAccessFile raf =
new RandomAccessFile(".....", "rw");
raf.skipBytes( (int)raf.length() );
raf.writeUTF(new String(""));
raf.close();


or do this :

Create a FileWriter object using this cunstructor
public FileWriter(String fileName, boolean append) throws IOException
and wrap it with a wrapper class you need (BufferedWriter..etc.).
The point is, if true is passed as the value of "append", you can append to the file.


I guess this helps.

Thanx,
Vijay.





Replies:

Sponsored Links



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