edu.nmu.os.shell
Class ShellFactoryImplParamParser

java.lang.Object
  |
  +--edu.nmu.os.shell.ShellFactoryImplParamParser

public class ShellFactoryImplParamParser
extends java.lang.Object

Parses a given String array to assist in the construction of a new ShellImpl

Since:
jdk1.4
Version:
0.1, Jan 25, 2003 4:29:14 PM
Author:
Matt Murphy
See Also:
ShellImpl, ShellFactoryImpl

Constructor Summary
ShellFactoryImplParamParser()
          Constructs a new ShellFactoryImplParamParser with an empty array
ShellFactoryImplParamParser(java.lang.String[] args)
          Constructs a new ShellFactoryImplParamParser
 
Method Summary
 java.lang.String doHelp()
          The help message to be printed
 java.io.PrintStream getExitStream()
          The PrintStream to which exit messages should be printed
 java.io.InputStream getInputStream()
          The InputStream from which the Shell should read.
protected  java.io.InputStream getInputStream(java.lang.String filename)
          Converts a file name to an InputStream
protected  java.io.PrintStream getPrintStream(java.lang.String filename)
          Converts a file name to an PrintStream
 java.io.PrintStream getThrowableStream()
          The PrintStream to which Throwables should be printed
protected  void setDefaults()
          Sets the default values for private variables
 boolean shouldDoHelp()
          Whether or not the help message should be printed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShellFactoryImplParamParser

public ShellFactoryImplParamParser()
Constructs a new ShellFactoryImplParamParser with an empty array


ShellFactoryImplParamParser

public ShellFactoryImplParamParser(java.lang.String[] args)
Constructs a new ShellFactoryImplParamParser

Parameters:
args - the arguments to parse
Method Detail

setDefaults

protected void setDefaults()
Sets the default values for private variables


shouldDoHelp

public boolean shouldDoHelp()
Whether or not the help message should be printed

Returns:
true if the message should be printed

getExitStream

public java.io.PrintStream getExitStream()
The PrintStream to which exit messages should be printed

Returns:
the PrintStream

getThrowableStream

public java.io.PrintStream getThrowableStream()
The PrintStream to which Throwables should be printed

Returns:
the PrintStream

getInputStream

public java.io.InputStream getInputStream()
The InputStream from which the Shell should read.

Returns:

doHelp

public java.lang.String doHelp()
The help message to be printed

Returns:
the help message

getInputStream

protected java.io.InputStream getInputStream(java.lang.String filename)
                                      throws java.io.FileNotFoundException
Converts a file name to an InputStream

Parameters:
filename - the file to read from
Returns:
the InputStream
Throws:
java.io.FileNotFoundException - if the file could not be found

getPrintStream

protected java.io.PrintStream getPrintStream(java.lang.String filename)
                                      throws java.io.FileNotFoundException
Converts a file name to an PrintStream

Parameters:
filename - the file to write to
Returns:
the PrintStream
Throws:
java.io.FileNotFoundException - if the file could not be found