import java.io.File; 
import java.io.FileWriter; 
import java.io.IOException; 

public class TestFileAccess { 

	public static void main(String[] args) throws InterruptedException, IOException { 

		File f = new File("C:\\TEMP\\TestFile.log"); 
		FileWriter out = new FileWriter (f); 
		for (;;) { 
			out.append("Hello, World"); 
			out.flush(); 
			Thread.sleep(10); 
		} 
	} 
} 