public static class Exec.OutputStreamChecker
extends java.io.OutputStream
implements java.io.Serializable
Constructor and Description |
---|
Exec.OutputStreamChecker(java.io.OutputStream ostream,
java.lang.String checkFor)
Checks for string in output stream.
|
Exec.OutputStreamChecker(java.io.OutputStream ostream,
java.lang.String checkFor,
boolean regexp,
java.io.File copyToFile)
Checks for string in output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addOutputStreamCheckerListener(Exec.OutputStreamCheckerListener l) |
void |
close() |
java.io.File |
getCopyToFile() |
boolean |
getFound() |
java.lang.String |
getFoundLine() |
void |
removeOutputStreamCheckerListener(Exec.OutputStreamCheckerListener l) |
void |
write(int b) |
public Exec.OutputStreamChecker(java.io.OutputStream ostream, java.lang.String checkFor)
ostream
- send read data to this output stream (usually System.out)checkFor
- the string to check forpublic Exec.OutputStreamChecker(java.io.OutputStream ostream, java.lang.String checkFor, boolean regexp, java.io.File copyToFile)
ostream
- send read data to this output stream (usually System.out)checkFor
- the string to check forregexp
- if true, the string is considered a regular expressioncopyToFile
- if non-null, the output is copied to this filepublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void addOutputStreamCheckerListener(Exec.OutputStreamCheckerListener l)
public void removeOutputStreamCheckerListener(Exec.OutputStreamCheckerListener l)
public boolean getFound()
public java.lang.String getFoundLine()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
public java.io.File getCopyToFile()