Class JAIPNMWriter

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class JAIPNMWriter
    extends JAIWriter
    Write a javax.media.jai.RenderedOp to a specified PNM file. PNM is an extension of the portable bitmap file format.

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

    If the writeRawData parameter has value true, then this actor will write in binary. If true (the default), then then the actor will write ASCII data.

    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.

    Since:
    Ptolemy II 3.0
    Version:
    $Id$
    Author:
    James Yeh, Christopher Hylands Brooks
    See Also:
    FileParameter
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Field Detail

      • writeRawData

        public Parameter writeRawData
        If true, then write raw binary data. If false (the default), then write the data in ASCII.
    • Method Detail

      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Read an input JAIImageToken and write it to the file. If the file does not exist then create it. If the file already exists, then query the user for overwrite.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class JAIWriter
        Returns:
        True if the execution can continue.
        Throws:
        IllegalActionException - If the file cannot be opened or created, if the user refuses to overwrite an existing file, of if the image in unable to be encoded.