org.sonatype.gshell.util.io
Class PromptReader
java.lang.Object
org.sonatype.gshell.util.io.PromptReader
public class PromptReader
- extends Object
Helper to prompt a user for information.
- Since:
- 2.3
- Author:
- Jason Dillon
|
Nested Class Summary |
static interface |
PromptReader.Validator
Allows caller to customize the validation behavior when prompting. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PromptReader
public PromptReader(StreamSet streams,
jline.Terminal term)
throws IOException
- Throws:
IOException
createReader
protected jline.console.ConsoleReader createReader(StreamSet streams,
jline.Terminal term)
throws IOException
- Throws:
IOException
getMask
public char getMask()
setMask
public void setMask(char mask)
readLine
public String readLine(String prompt,
PromptReader.Validator validator)
throws IOException
- Throws:
IOException
readLine
public String readLine(String prompt)
throws IOException
- Throws:
IOException
readLine
public String readLine(String prompt,
char mask,
PromptReader.Validator validator)
throws IOException
- Throws:
IOException
readLine
public String readLine(String prompt,
char mask)
throws IOException
- Throws:
IOException
readPassword
public String readPassword(String prompt,
PromptReader.Validator validator)
throws IOException
- Throws:
IOException
readPassword
public String readPassword(String prompt)
throws IOException
- Throws:
IOException
Copyright © 2008-2011 Sonatype. All Rights Reserved.