FreeHEP API
Version v1.2

org.freehep.util.io
Class PromptInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.freehep.util.io.RoutedInputStream
              |
              +--org.freehep.util.io.PromptInputStream

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,v 1.3 2002/12/06 16:55:13 duns Exp $
Author:
Mark Donszelmann

Nested Class Summary
 
Nested classes inherited from class org.freehep.util.io.RoutedInputStream
RoutedInputStream.Route
 
Constructor Summary
PromptInputStream(InputStream input)
           
 
Method Summary
 void addPromptListener(String prompt, PromptListener listener)
           
 
Methods inherited from class org.freehep.util.io.RoutedInputStream
addRoute, addRoute, read
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PromptInputStream

public PromptInputStream(InputStream input)
Method Detail

addPromptListener

public void addPromptListener(String prompt,
                              PromptListener listener)

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.