Logo Search packages:      
Sourcecode: wims version File versions

synchronized void ptolemy::plot::PlotBox::read ( InputStream  in  )  throws IOException [inline]

Read commands and/or plot data from an input stream in the old (non-XML) file syntax. To update the display, call repaint(), or make the plot visible with setVisible(true).

To read from standard input, use:

To read from a url, use:
To read a URL from within an applet, use:
     URL url = new URL(getDocumentBase(), urlSpec);
Within an application, if you have an absolute URL, use:
     URL url = new URL(urlSpec);
To read from a file, use:
     read(new FileInputStream(filename));
in The input stream.
IOException If the stream cannot be read.

Reimplemented in ptolemy::plot::Plot.

Definition at line 1088 of file PlotBox.java.

References _parseLine().

Referenced by ptolemy::plot::PlotFrame::_read(), ptolemy::plot::PlotApplet::_read(), ptolemy::plot::PlotFormatter::apply(), ptolemy::plot::PlotFormatter::PlotFormatter(), and ptolemy::plot::PlotApplet::read_from_param().

        try {
            // NOTE: I tried to use exclusively the jdk 1.1 Reader classes,
            // but they provide no support like DataInputStream, nor
            // support for URL accesses.  So I use the older classes
            // here in a strange mixture.
            BufferedReader din = new BufferedReader(new InputStreamReader(in));

            try {
                String line = din.readLine();

                while (line != null) {
                    line = din.readLine();
            } finally {
        } catch (IOException e) {
            _errorMsg = new String[2];
            _errorMsg[0] = "Failure reading input data.";
            _errorMsg[1] = e.getMessage();
            throw e;

Generated by  Doxygen 1.6.0   Back to index