|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
org.extex.ocpware.engine.OcpReader
public class OcpReader
This reader applies an ΩCP program to an input stream.
OcpCode| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
OcpReader(java.io.Reader reader,
OcpProgram program)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
close()
|
int[] |
getArithStack()
Getter for arithStack. |
int |
getCodeWord()
Getter for the next code word. |
int |
getLast()
Getter for last. |
java.lang.String |
getLine()
Get the line of characters already read. |
int |
getPc()
Getter for the program counter. |
OcpProgram |
getProgram()
Getter for program. |
int |
getSomeEnd()
Getter for someEnd. |
int |
getSomePtr()
Getter for somePtr. |
int |
getStart()
Getter for start. |
int |
getState()
Getter for the current state. |
int |
read()
|
int |
read(char[] cbuf,
int off,
int len)
|
void |
register(OcpReaderObserver observer)
Register an observer to be informed about certain events. |
java.lang.String |
toString()
|
| Methods inherited from class java.io.Reader |
|---|
mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OcpReader(java.io.Reader reader,
OcpProgram program)
throws java.lang.IllegalArgumentException,
UnsupportedOutputException
reader - the reader for input characters. This is not allowed to be
null.program - the program code to run. This is not allowed to be
null.
java.lang.IllegalArgumentException - in case that one of the arguments is
null
UnsupportedOutputException - in case of an unknown output size is
encountered| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Readerjava.io.IOExceptionReader.close()public int[] getArithStack()
public int getCodeWord()
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - in case that the requested word
does not existpublic int getLast()
public java.lang.String getLine()
public int getPc()
public OcpProgram getProgram()
public int getSomeEnd()
public int getSomePtr()
public int getStart()
public int getState()
public int read()
throws java.io.IOException,
OcpEmptyStackException,
IllegalPcException
read in class java.io.ReaderOcpEmptyStackException - in case of an empty stack
IllegalPcException - if the program counter points outside the code
area
java.io.IOExceptionReader.read()
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionReader.read(char[], int, int)public void register(OcpReaderObserver observer)
observer - the observer to registerpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||