com.atlassian.jira.configurator.console
Class DeviceConsoleProvider
java.lang.Object
com.atlassian.jira.configurator.console.DeviceConsoleProvider
- All Implemented Interfaces:
- ConsoleProvider
public class DeviceConsoleProvider
- extends Object
Implements a console as backed by a Java 1.6 System.console()
device.
This is preferred over the StreamConsoleProvider
when System.console()
provides a non-null
value, because it can suppress the display of passwords.
- Since:
- v5.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeviceConsoleProvider
public DeviceConsoleProvider(Console console)
readLine
public String readLine(String prompt)
throws IOException
- Throws:
IOException
readPassword
public String readPassword(String prompt)
throws IOException
- Throws:
IOException
println
public void println()
print
public void print(String text)
println
public void println(String text)
printErrorMessage
public void printErrorMessage(String errorMessage)
- Specified by:
printErrorMessage
in interface ConsoleProvider
printErrorMessage
public void printErrorMessage(Throwable ex)
- Specified by:
printErrorMessage
in interface ConsoleProvider
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
Copyright © 2002-2014 Atlassian. All Rights Reserved.