org.freehep.util.io
Class PromptInputStream
java.lang.Object
java.io.InputStream
org.freehep.util.io.RoutedInputStream
org.freehep.util.io.PromptInputStream
- All Implemented Interfaces:
- Closeable
public class PromptInputStream
- extends RoutedInputStream
The PromptInputStream reads from an inputstream until it reads any prompt for
which a listener is added. The listener is informed that the prompt is found.
The route which contains the prompt is supplied as a parameter to the
listener. Returning from the prompt listener without reading the route to its
end will allow the main stream to read it.
The implementation of this class is based on the RoutedInputStream.
- Version:
- $Id: PromptInputStream.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PromptInputStream
public PromptInputStream(InputStream input)
- Craete a Prompt input stream.
- Parameters:
input
- stream to read
addPromptListener
public void addPromptListener(String prompt,
PromptListener listener)
- Add a prompt listener for given prompt.
- Parameters:
prompt
- prompt to listen forlistener
- listener to be informed
Copyright © 2000-2007 FreeHEP. All Rights Reserved.