edu.rice.comp211.laundry.io
Class TerminalIO

java.lang.Object
  extended by edu.rice.comp211.laundry.io.TerminalIO
All Implemented Interfaces:
IOProcess

public class TerminalIO
extends Object
implements IOProcess

Terminal implementation of the IOProcess interface.


Field Summary
(package private)  boolean debug
           
(package private)  StreamTokenizer in
           
(package private)  InputStream inputStream
           
(package private) static String morespaces
           
(package private)  OutputStream outputStream
           
(package private)  StudentEnvironment sEnv
           
(package private) static String spaces
           
 
Constructor Summary
TerminalIO(InputStream is, OutputStream os)
           
TerminalIO(String fName)
           
TerminalIO(String inputName, OutputStream os)
           
TerminalIO(String inputName, String outputName)
           
 
Method Summary
static void main(String[] args)
           
 Command nextCommand()
           
 OutputStream open(StudentEnvironment sEnv, boolean debug)
           
(package private) static Garment parseGarment(String noun, String adjective)
           
(package private)  String parseWord()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

StreamTokenizer in

sEnv

StudentEnvironment sEnv

debug

boolean debug

inputStream

InputStream inputStream

outputStream

OutputStream outputStream

spaces

static String spaces

morespaces

static String morespaces
Constructor Detail

TerminalIO

public TerminalIO(String fName)

TerminalIO

public TerminalIO(String inputName,
                  String outputName)

TerminalIO

public TerminalIO(String inputName,
                  OutputStream os)

TerminalIO

public TerminalIO(InputStream is,
                  OutputStream os)
Method Detail

open

public OutputStream open(StudentEnvironment sEnv,
                         boolean debug)
Specified by:
open in interface IOProcess

parseWord

String parseWord()
           throws IOException
Throws:
IOException

parseGarment

static Garment parseGarment(String noun,
                            String adjective)
                     throws CommandException
Throws:
CommandException

nextCommand

public Command nextCommand()
                    throws IOException
Specified by:
nextCommand in interface IOProcess
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException