ExpressionWriter
ptolemy.actor.lib.io.ExpressionWriter

This actor reads input tokens and writes them, one line at a time, to a specified file. The format it uses is that generated by the toString() method of the token, which for most tokens is an expression that can be read back in using ExpressionReader. String tokens, for example, include the enclosing quotation marks in the output. If you do not want the enclosing quotation marks, use LineWriter.

The file is specified by the fileName attribute using any form acceptable to FileParameter.

If the append attribute has value true, then the file will be appended to. If it has value false, then if the file exists, the user will be queried for permission to overwrite, and if granted, the file will be overwritten.

If the confirmOverwrite parameter has value false, then this actor will overwrite the specified file if it exists without asking. If true (the default), then if the file exists, then this actor will ask for confirmation before overwriting.

Author(s): Edward A. Lee
Version:$Id: ExpressionWriter.java,v 1.22 2005/07/08 19:56:23 cxh Exp $
Pt.Proposed Rating:Green (eal)
Pt.Accepted Rating:Yellow (cxh)