com.mindbright.util
Interface ExpectOutputStream.Expector

All Known Implementing Classes:
RemoteShellScript, SSHRemoteFileBrowsingConsole
Enclosing interface:
ExpectOutputStream

public static interface ExpectOutputStream.Expector

Interface to be implemented by classes interested when the event ExpectOutputStream waits for happens.

See Also:
ExpectOutputStream

Method Summary
 void closed(ExpectOutputStream out, byte[] buf, int len)
          This function is called when the data stream is closed.
 void reached(ExpectOutputStream out, byte[] buf, int len)
          This function is called whenever the expected string is found in the data stream.
 

Method Detail

reached

public void reached(ExpectOutputStream out,
                    byte[] buf,
                    int len)
This function is called whenever the expected string is found in the data stream.

Parameters:
out - the stream this happened on.
buf - a buffer containing all the data which has been seen on the stream since the last time reached was called. Note that the buffer may be bigger than needed.
len - how many bytes of data there is in the buffer.

closed

public void closed(ExpectOutputStream out,
                   byte[] buf,
                   int len)
This function is called when the data stream is closed.

Parameters:
out - the stream this happened on.
buf - a buffer containing all the data which has been seen on the stream since the last time reached was called. Note that the buffer may be bigger than needed.
len - how many bytes of data there is in the buffer.