Documentation of 'org.freehep.util.io.PromptInputStream' Java class
PromptInputStream
org.freehep.util.io

Class PromptInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    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.
    • Constructor Detail

      • PromptInputStream

        public PromptInputStream(java.io.InputStream input)
        Craete a Prompt input stream.
        Parameters:
        input - stream to read
    • Method Detail

      • addPromptListener

        public void addPromptListener(java.lang.String prompt,
                                      PromptListener listener)
        Add a prompt listener for given prompt.
        Parameters:
        prompt - prompt to listen for
        listener - listener to be informed

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.