com.panayotis.gnuplot.terminal
Class TextFileTerminal
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.String>
com.panayotis.gnuplot.PropertiesHolder
com.panayotis.gnuplot.terminal.ExpandableTerminal
com.panayotis.gnuplot.terminal.FileTerminal
com.panayotis.gnuplot.terminal.TextFileTerminal
- All Implemented Interfaces:
- GNUPlotTerminal, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>
- Direct Known Subclasses:
- PostscriptTerminal, SVGTerminal
public class TextFileTerminal
- extends FileTerminal
Base class of all terminals with output in text format.
- See Also:
- Serialized Form
|
Field Summary |
protected java.lang.String |
output
|
|
Constructor Summary |
TextFileTerminal(java.lang.String type)
Creates a new instance of TextFileTerminal. |
TextFileTerminal(java.lang.String type,
java.lang.String filename)
Creates a new instance of TextFileTerminal and output to a specific file |
|
Method Summary |
java.lang.String |
getTextOutput()
Retrieve the String with the output of the last gnuplot command |
java.lang.String |
processOutput(java.io.InputStream stdout)
Process output of this terminal. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
output
protected java.lang.String output
TextFileTerminal
public TextFileTerminal(java.lang.String type)
- Creates a new instance of TextFileTerminal.
The output will be parsed by JavaPlot and stored in a String, since it is
expected to be a text and not binary data.
- Parameters:
type - the terminal type
TextFileTerminal
public TextFileTerminal(java.lang.String type,
java.lang.String filename)
- Creates a new instance of TextFileTerminal and output to a specific file
- Parameters:
type - the terminal typefilename - the file to save output to
processOutput
public java.lang.String processOutput(java.io.InputStream stdout)
- Process output of this terminal. Since this is a text terminal, the output
will be stored in a String
- Specified by:
processOutput in interface GNUPlotTerminal- Overrides:
processOutput in class ExpandableTerminal
- Parameters:
stdout - The gnuplot output stream
- Returns:
- Return the error as a String, if an error occured.
getTextOutput
public java.lang.String getTextOutput()
- Retrieve the String with the output of the last gnuplot command
- Returns:
- The String with gnuplot output