|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgcspy.comm.CommandStream
public class CommandStream
Parses a buffered I/O stream and invokes the commands in it
| Field Summary | |
|---|---|
protected Command[] |
cmds
An array of GCspy commands |
static int |
FIRST_AVAILABLE_CMD
The index of the first command |
protected int |
max
The index of the largest numbered command |
protected BufferedOutput |
output
The output buffer |
| Constructor Summary | |
|---|---|
CommandStream()
Create an emty command stream |
|
CommandStream(Command[] cmds)
Create a new array of commands |
|
CommandStream(int len)
Create a new array of commands |
|
| Method Summary | |
|---|---|
void |
execute(BufferedInput input)
Read a command and execute it |
void |
finish()
Finish the command stream |
void |
finish(BufferedOutput output)
Finish the command stream for a BufferedOutput |
byte |
getCmd(BufferedInput input)
Get a command from a BufferedInput |
void |
putCmd(BufferedOutput output,
byte cmd)
Put a command into a BufferedOutput |
void |
putCmd(byte cmd)
Put a command into the output buffer |
void |
setBufferedOutput(BufferedOutput output)
Set the Buffered Output. |
void |
start()
Start the command stream |
protected void |
start(BufferedOutput output)
Start a command using a BufferedOutput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Command[] cmds
protected int max
protected BufferedOutput output
public static final int FIRST_AVAILABLE_CMD
| Constructor Detail |
|---|
public CommandStream(Command[] cmds)
cmds - The new commandspublic CommandStream(int len)
len - The number of commandspublic CommandStream()
| Method Detail |
|---|
public void execute(BufferedInput input)
input - The BufferedInput from which to read the commandpublic void setBufferedOutput(BufferedOutput output)
public void start()
protected void start(BufferedOutput output)
output - The BufferedOutputpublic void finish()
public void finish(BufferedOutput output)
output - The BufferedOutputpublic void putCmd(byte cmd)
cmd - The command
public void putCmd(BufferedOutput output,
byte cmd)
output - The BufferedOutputcmd - The commandpublic byte getCmd(BufferedInput input)
input - The VufferedInput
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||