org.sourcejammer.util
Class CommandLine

java.lang.Object
  |
  +--org.sourcejammer.util.CommandLine

public class CommandLine
extends java.lang.Object

Title: SourceJammer v 0.1.0 Description: Copyright: Copyright (c) 2001 Company:

Version:
$Revision: 1.3 $
Author:
Robert MacGrogan

Field Summary
private  java.io.InputStream mstmIn
           
private  java.io.PrintStream mstmOut
           
 
Constructor Summary
CommandLine()
          Create a CommandLine object getting input from default input stream
CommandLine(java.io.InputStream stmIn, java.io.PrintStream stmOut)
          Create a CommandLine object getting input from the passed in stream.
 
Method Summary
 java.io.PrintStream getPrintStream()
           
 java.lang.String getUserInput(java.lang.String prompt)
          Promts users at System.out with prompt message, waits for user input, and returns user input as String.
 void print(java.lang.String s)
           
 void println(java.lang.String s)
          Print a line to this CommandLine's output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mstmIn

private java.io.InputStream mstmIn

mstmOut

private java.io.PrintStream mstmOut
Constructor Detail

CommandLine

public CommandLine()
Create a CommandLine object getting input from default input stream


CommandLine

public CommandLine(java.io.InputStream stmIn,
                   java.io.PrintStream stmOut)
Create a CommandLine object getting input from the passed in stream.

Method Detail

println

public void println(java.lang.String s)
Print a line to this CommandLine's output stream.


print

public void print(java.lang.String s)

getPrintStream

public java.io.PrintStream getPrintStream()

getUserInput

public java.lang.String getUserInput(java.lang.String prompt)
                              throws java.io.IOException
Promts users at System.out with prompt message, waits for user input, and returns user input as String.

java.io.IOException


Copyright 2003 Soucejammer project.