|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.ocpware.type.OcpProgram
public class OcpProgram
This class represents a compiled omega program.
| Constructor Summary | |
|---|---|
OcpProgram()
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
addState(int[] t)
Add a state. |
void |
addTable(int[] t)
Add a table. |
int[] |
getCode(int state)
Getter for a state's code. |
int |
getInput()
Getter for the number of input bytes. |
int |
getLength()
Getter for the length. |
int |
getOutput()
Getter for output. |
java.util.List<int[]> |
getStates()
Getter for states. |
int[] |
getTable(int i)
Getter for a table. |
java.util.List<int[]> |
getTables()
Getter for tables. |
static OcpProgram |
load(java.io.InputStream stream)
Load an OCP program from an input stream. |
void |
save(java.io.OutputStream stream)
Save an OCP program to an output stream. |
void |
setInput(int input)
Setter for input. |
void |
setOutput(int output)
Setter for output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OcpProgram()
| Method Detail |
|---|
public static OcpProgram load(java.io.InputStream stream)
throws java.io.IOException
stream - the input stream
java.io.IOException - in case of an IO errorpublic void addState(int[] t)
t - the state to add
public void addTable(int[] t)
throws java.lang.IndexOutOfBoundsException
t - the table to add
java.lang.IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= tables.size()).
public int[] getCode(int state)
throws java.lang.IndexOutOfBoundsException
state - the state
java.lang.IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= states.size()).public int getInput()
public int getLength()
public int getOutput()
public java.util.List<int[]> getStates()
public java.util.List<int[]> getTables()
public int[] getTable(int i)
i - the index
public void save(java.io.OutputStream stream)
throws java.io.IOException
stream - the output stream
java.io.IOException - in case of an IO errorpublic void setInput(int input)
input - the input to setpublic void setOutput(int output)
output - the output to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||