name.angoca.db2sa.cli.system
Class SystemInputReader

Package class diagram package SystemInputReader
java.lang.Object
  extended by name.angoca.db2sa.cli.system.SystemInputReader
All Implemented Interfaces:
InputReader

public final class SystemInputReader
extends Object
implements InputReader

Implementation of the input reader using the System.In option. This class flushes the stream before start to read.
Control Version

Version:
1.0.0 2009-07-19
Author:
Andres Gomez Casanova (AngocA)

Constructor Summary
SystemInputReader(OutputWriter outputWriter, String prompt)
          Constructor that flushes the stream.
 
Method Summary
 String readString()
          Reads the phrases written by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemInputReader

public SystemInputReader(OutputWriter outputWriter,
                         String prompt)
                  throws InputReaderException
Constructor that flushes the stream.

Parameters:
outputWriter - OutputWriter to write the prompt.
prompt - Prompt to show in each line of the console.
Throws:
InputReaderException - If there is a problem flushing the stream.
Method Detail

readString

public String readString()
                  throws InputReaderException
Description copied from interface: InputReader
Reads the phrases written by the user.

Specified by:
readString in interface InputReader
Returns:
Phrase written by the user.
Throws:
InputReaderException - If some problem occurs.


Andres Gomez Casanova (AngocA) Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.