All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class duckMachine.architecture.ioUnit

java.lang.Object
   |
   +----duckMachine.architecture.ioUnit

public class ioUnit
extends Object
implements ioUnitI
The input output unit of the machine. This will not work with jdk-1.0!


Constructor Index

 o ioUnit()
 o ioUnit(InputStream, OutputStream)

Method Index

 o getReader()
 o getWriter()
 o readData()
Reads an integer from the input stream.
 o writeData(Word)
Writes an int and flushes the output stream.

Constructors

 o ioUnit
 public ioUnit()
 o ioUnit
 public ioUnit(InputStream i,
               OutputStream o)

Methods

 o getReader
 public StreamTokenizer getReader()
 o getWriter
 public PrintWriter getWriter()
 o readData
 public Word readData() throws ioE
Reads an integer from the input stream. If the next token is a number but not an integer, it is coerced to an int.

Throws: ioE
If the input cannot be parsed as a number or some kind of IO exception occurs.
 o writeData
 public void writeData(Word w)
Writes an int and flushes the output stream.


All Packages  Class Hierarchy  This Package  Previous  Next  Index