Public Member Functions | Protected Attributes

antlr.PreservingFileWriter Class Reference

Inherits java::io::FileWriter.

List of all members.

Public Member Functions

 PreservingFileWriter (String file) throws IOException
 the tmp file we create at first
void close () throws IOException

Protected Attributes

File target_file
File tmp_file
 the file we intend to write to

Detailed Description

PreservingFileWriter only overwrites target if the new file is different. Mainly added in order to prevent big and unnecessary recompiles in C++ projects. I/O is buffered.


Constructor & Destructor Documentation

antlr.PreservingFileWriter.PreservingFileWriter ( String  file  )  throws IOException

the tmp file we create at first

References antlr.PreservingFileWriter.target_file, and antlr.PreservingFileWriter.tmp_file.


Member Function Documentation

void antlr.PreservingFileWriter.close (  )  throws IOException

Close the file and see if the actual target is different if so the target file is overwritten by the copy. If not we do nothing

References antlr.PreservingFileWriter.target_file, and antlr.PreservingFileWriter.tmp_file.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties