org.jfortune
Class jfortuneclass

java.lang.Object
  extended byorg.jfortune.jfortuneclass

public class jfortuneclass
extends java.lang.Object

This is the main class which calls the other objects/classes, analyses input and then prints the quote or other information as told.


Constructor Summary
jfortuneclass(java.lang.String[] args)
          Constructor for a jfortuneclass object.Throws a IOException when the file parsed cannot be found..:)...silly you.
 
Method Summary
 java.lang.String getOutput()
          This returns the output(if we are passed the -r option, then this method should be called to get back all the output from the program).
 java.lang.String getQuote()
          The method does all the work of getting a quote from the file and sending it back to the caller function in a nice sorted way.
static void main(java.lang.String[] args)
           
 void run()
          This does the main work of calling the various other methods and displaying the quote.
static java.lang.String syntax()
          This displays jfortune Syntax information.
static java.lang.String version()
          This displays version information for jfortune.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

jfortuneclass

public jfortuneclass(java.lang.String[] args)
Constructor for a jfortuneclass object.Throws a IOException when the file parsed cannot be found..:)...silly you.

Parameters:
args - the command line options parsed.
Method Detail

run

public void run()
This does the main work of calling the various other methods and displaying the quote.


getQuote

public java.lang.String getQuote()
                          throws java.io.IOException
The method does all the work of getting a quote from the file and sending it back to the caller function in a nice sorted way.

Returns:
String A String which contains the quote to be displayed.
Throws:
java.io.IOException - If we recieve an IOException from the given file. This shouldn't ever happen since there are enough checks before reaching this step which acertain that there are no such loose cannons.

getOutput

public java.lang.String getOutput()
This returns the output(if we are passed the -r option, then this method should be called to get back all the output from the program).

Returns:
String A String containing all the output that needs to be displayed.

main

public static void main(java.lang.String[] args)

version

public static java.lang.String version()
This displays version information for jfortune.

Returns:
String A String containing the required information.

syntax

public static java.lang.String syntax()
This displays jfortune Syntax information.

Returns:
String A String containing the required iinformation.