net.sf.tomp.xtcl
Class CommandLineReader

java.lang.Object
  extended by net.sf.tomp.xtcl.CommandLineReader

public class CommandLineReader
extends java.lang.Object

Used to read command line from various sources, eg. console, file...

Version:
1.0

Field Summary
protected  java.io.BufferedReader br
          Bufferedreader to read command lines from
 
Constructor Summary
CommandLineReader()
          Creates a new instance of CommandLineReader - from console
CommandLineReader(java.io.BufferedReader b)
          Creates a new instance of CommandLineReader - from BufferedReader
CommandLineReader(java.io.File f)
          Creates a new instance of CommandLineReader - from File
CommandLineReader(java.lang.String s)
          Creates a new instance of CommandLineReader - from console
 
Method Summary
 java.lang.String nextCommandLine()
          The main and only method Reads next command line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

br

protected java.io.BufferedReader br
Bufferedreader to read command lines from

Constructor Detail

CommandLineReader

public CommandLineReader()
                  throws java.lang.Exception
Creates a new instance of CommandLineReader - from console

Throws:
java.lang.Exception - if something fails...

CommandLineReader

public CommandLineReader(java.lang.String s)
                  throws java.lang.Exception
Creates a new instance of CommandLineReader - from console

Parameters:
s - String to read command line from
Throws:
java.lang.Exception - if something fails...

CommandLineReader

public CommandLineReader(java.io.File f)
                  throws java.lang.Exception
Creates a new instance of CommandLineReader - from File

Parameters:
f - File to read command line from
Throws:
java.lang.Exception - if something fails...

CommandLineReader

public CommandLineReader(java.io.BufferedReader b)
                  throws java.lang.Exception
Creates a new instance of CommandLineReader - from BufferedReader

Parameters:
b - BufferedReader to read command line from
Throws:
java.lang.Exception - if something fails...
Method Detail

nextCommandLine

public java.lang.String nextCommandLine()
                                 throws java.lang.Exception
The main and only method Reads next command line

Returns:
next command line content
Throws:
java.lang.Exception - if something fails...