The Artima Developer Community
Sponsored Link

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

Reply: how to write a string to a new line using RandomAccessFile?

Posted by Julie Pham on October 16, 2001 at 4:10 PM

Let's try this.

RandomAccessFile f = new RandomAccessFile("filename","rw");

String lineSeparator = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));

........
f.writeBytes(lineSeparator);


> Please can any one write me tips how to append a string to a new line using RandamAccessFile






Replies:

Sponsored Links



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