public class

DeviceConsoleProvider

extends Object
implements ConsoleProvider
java.lang.Object
   ↳ com.atlassian.jira.configurator.console.DeviceConsoleProvider

Class Overview

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.

Summary

Public Constructors
DeviceConsoleProvider(Console console)
Public Methods
void flush()
void print(String text)
void printErrorMessage(String errorMessage)
void printErrorMessage(Throwable ex)
void println()
void println(String text)
char readFirstChar(String prompt)
String readLine(String prompt)
String readLine()
String readPassword(String prompt)
boolean readYesNo(String prompt, boolean defaultValue)
Protected Methods
IOException closed()
void showPrompt(String prompt)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.configurator.console.ConsoleProvider

Public Constructors

public DeviceConsoleProvider (Console console)

Public Methods

public void flush ()

public void print (String text)

public void printErrorMessage (String errorMessage)

public void printErrorMessage (Throwable ex)

public void println ()

public void println (String text)

public char readFirstChar (String prompt)

Throws
IOException

public String readLine (String prompt)

Throws
IOException

public String readLine ()

Throws
IOException

public String readPassword (String prompt)

Throws
IOException

public boolean readYesNo (String prompt, boolean defaultValue)

Throws
IOException

Protected Methods

protected IOException closed ()

protected void showPrompt (String prompt)