public abstract class Viewer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.InputStream |
isSource
The InputStream to read the contents of the file from.
|
Modifier | Constructor and Description |
---|---|
protected |
Viewer(java.lang.Object o)
Constructor to be called from the extensions of this class, it looks at the input object and builds the actual input stream from it.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getProgramOutput(java.lang.String sProgram)
Executes the given program and passes the contents of the InputStream to the programs's standard in and returns the text that the
program produces at its standard output.
|
abstract java.lang.String |
getString()
This is to be implemented by every viewer.
|
protected java.io.InputStream isSource
protected Viewer(java.lang.Object o)
isSource
will remain null.o
- input methodpublic abstract java.lang.String getString()
protected final java.lang.String getProgramOutput(java.lang.String sProgram)
sProgram
- program to call