gnu.mapping
Class TtyInPort
- Printable
An interactive input-port.
Supports prompting, auto-flush of tied output port, transcripts.
fill , getColumnNumber , getConvertCR , getLineNumber , getName , getReadState , lineStart , mark , markSupported , peek , read , read , readLine , readLine , ready , reset , setBuffer , setConvertCR , setLineNumber , setName , skip , skip , skip_quick , unread , unread_quick |
TtyInPort
public TtyInPort(InputStream in,
String name,
OutPort tie)
TtyInPort
public TtyInPort(Reader in,
String name,
OutPort tie)
getPrompter
public Procedure getPrompter()
Get the current prompter function.
read
public int read(cbuf[] ,
int off,
int len)
throws IOException
setPrompter
public void setPrompter(Procedure prompter)
Set the prompter function.
The argument is called when a new line is read.
It is passed one argument (this input port), and should return
a string. That string is printed as the prompt string.