com.atlassian.jira.configurator.console
Class StreamConsoleProvider
java.lang.Object
com.atlassian.jira.configurator.console.StreamConsoleProvider
- All Implemented Interfaces:
- ConsoleProvider
public class StreamConsoleProvider
- extends Object
Console provider based on System.in
and System.out
.
The DeviceConsoleProvider
should be preferred when System.console()
returns a non-null value.
- Since:
- v5.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamConsoleProvider
public StreamConsoleProvider(InputStream in,
PrintStream out)
readLineImpl
protected String readLineImpl()
throws IOException
- Throws:
IOException
readLine
public String readLine(String prompt)
throws IOException
- Throws:
IOException
readPassword
public String readPassword(String prompt)
throws IOException
- Throws:
IOException
print
public void print(String text)
println
public void println()
println
public void println(String text)
flush
public void flush()
closed
protected IOException closed()
showPrompt
protected void showPrompt(String prompt)
readLine
public String readLine()
throws IOException
- Specified by:
readLine
in interface ConsoleProvider
- Throws:
IOException
readFirstChar
public char readFirstChar(String prompt)
throws IOException
- Specified by:
readFirstChar
in interface ConsoleProvider
- Throws:
IOException
readYesNo
public boolean readYesNo(String prompt,
boolean defaultValue)
throws IOException
- Specified by:
readYesNo
in interface ConsoleProvider
- Throws:
IOException
printErrorMessage
public void printErrorMessage(String errorMessage)
- Specified by:
printErrorMessage
in interface ConsoleProvider
printErrorMessage
public void printErrorMessage(Throwable ex)
- Specified by:
printErrorMessage
in interface ConsoleProvider
Copyright © 2002-2014 Atlassian. All Rights Reserved.