Package adams.core.scripting
Class JepOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- adams.core.scripting.JepOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class JepOutputStream extends OutputStream
For redirecting output from the Python stdout/stderr to Java.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description JepOutputStream(boolean stdout)
Initializes the output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isStdOut()
Returns whether for stdout or stderr.void
write(int b)
Writes the specified byte to this output stream.-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
-
-
-
Method Detail
-
isStdOut
public boolean isStdOut()
Returns whether for stdout or stderr.- Returns:
- true if stdout
-
write
public void write(int b) throws IOException
Writes the specified byte to this output stream. The general contract forwrite
is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argumentb
. The 24 high-order bits ofb
are ignored.- Specified by:
write
in classOutputStream
- Parameters:
b
- thebyte
.- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
-