The FileReader applet is a data access applet that publishes an 8-bit ASCII sequential file to the InfoBus as an ArrayAccess type data item.
The applet "tokenizes" an input file by parsing it for token strings delimited by white space characters. It does this by using the java.io.StreamTokenizer class. Each token string goes into a separate element of the output array and each line of the input file goes into a separate output array row.
Embedding the FileReader Applet in an HTML Document
The following code example demonstrates how an instance of the FileReader applet is embedded in an HTML page. The APPLET tag is immediately followed by PARAM (parameter) tags that provide the configuration information for the applet.
<APPLET CODE="code_base.lotus.filereader.FileReader"
NAME="fileRdr"
WIDTH=1
HEIGHT=1
ARCHIVE="jars/devpack_filereader_app.jar" >
<PARAM NAME="fileDataItemName" VALUE="dinFileIn">
<PARAM NAME="outputName" VALUE="dinFileOut">
<PARAM NAME="cabinets" VALUE="cabs/devpack_filereader_app.cab">
</APPLET>
FileReader Applet Parameter Tags
The following parameter (PARAM) tags are available for configuring the FileReader applet via HTML:
outputName PARAM tag
filename PARAM tag
fileDataItemName PARAM tag
debug PARAM tag
verbose PARAM tag
FileReader Applet Properties
The following properties are available for accessing the FileReader applet programatically:
OutputName property
Filename property
FileDateItemName property