com.panayotis.gnuplot.terminal
Class TextFileTerminal

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by com.panayotis.gnuplot.PropertiesHolder
              extended by com.panayotis.gnuplot.terminal.ExpandableTerminal
                  extended by com.panayotis.gnuplot.terminal.FileTerminal
                      extended by 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
           
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
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 com.panayotis.gnuplot.terminal.FileTerminal
getOutputFile
 
Methods inherited from class com.panayotis.gnuplot.terminal.ExpandableTerminal
getType
 
Methods inherited from class com.panayotis.gnuplot.PropertiesHolder
appendProperties, set, set, unset
 
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
 

Field Detail

output

protected java.lang.String output
Constructor Detail

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 type
filename - the file to save output to
Method Detail

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