com.atlassian.jira.configurator.console
Class StreamConsoleProvider

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.configurator.console.ConsoleProvider
ConsoleProvider.Factory
 
Constructor Summary
StreamConsoleProvider(InputStream in, PrintStream out)
           
 
Method Summary
protected  IOException closed()
           
 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 readLine(String prompt)
           
protected  String readLineImpl()
           
 String readPassword(String prompt)
           
 boolean readYesNo(String prompt, boolean defaultValue)
           
protected  void showPrompt(String prompt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamConsoleProvider

public StreamConsoleProvider(InputStream in,
                             PrintStream out)
Method Detail

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.