This actor reads tokens from an URL, and output them. Each entry in
the file corresponds to one iteration. If there are multiple fires in
the iteration, the same token will be repeated. This actor has a
multiport, where each port corresponds to one column in the data file.
<p> The file format at the URL is assumed as the following. A newline
character separates the rows, and a tab or a space character separates
the columns.
<p> The <i>sourceURL</i> parameter should be set to the name of the
file, specified as a fully qualified URL. If the <i>sourceURL</i>
parameter is an empty string, then the System.in is used for input.
It is possible to load a file from the local file system by using the
prefix "file://" instead of "http://". Relative file paths are
allowed. To specify a file relative to the current directory, use
"../" or "./". For example, if the current directory contains a file
called "test.txt", then <i>sourceURL</i> should be set to
"file:./test.txt". If the parent directory contains a file called
"test.txt", then <i>sourceURL</i> should be set to
"file:../test.txt". To reference the file test.txt, located at
"/tmp/test.txt", <i>sourceURL</i> should be set to
"file:///tmp/test.txt" The default value is "file:///tmp/test.txt".
<p>FIXME: The type of the output ports is set to Double for now.
It should read a line in the prefire() and refer the type
from there.
<p>FIXME: Reader should read in expressions and serialized tokens
Jie Liu
$Id: Reader.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 1.0
Red (liuj)
Red (liuj)
The URL of the file to read from. This parameter contains
a StringToken. By default, it contains an empty string, which
is interpreted to mean that input should be directed to the
standard input.
FIXME: Should this bring up a dialog box to type (or select) a URL?
Refresh between each readings. Default is false.