public class CommandSequence
extends java.lang.Object
Constructor and Description |
---|
CommandSequence(Model model,
java.io.PrintWriter logFile)
Class to read and write cmdfiles
|
Modifier and Type | Method and Description |
---|---|
int |
flush(java.io.PrintWriter f)
Flush writeCmdBuffer to PrintWriter f
|
long |
readInit(java.io.BufferedReader f)
Reads all commands in init-phase from reader f
and execute them (Command.execute)
|
long |
readUntilTime(java.io.BufferedReader f,
long time)
Reads the next commands in reader f until time-value > time
and execute them (Command.execute)
|
int |
write(Command command)
Write a command on internal writeCmdBuffer
|
public CommandSequence(Model model, java.io.PrintWriter logFile)
model
- Model used to execute commandslogFile
- LogFile, may be nullpublic long readInit(java.io.BufferedReader f) throws CommandException, ModelException, java.io.IOException
f
- Reader with cmds-fileCommandException
ModelException
java.io.IOException
public long readUntilTime(java.io.BufferedReader f, long time) throws CommandException, ModelException, java.io.IOException
f
- time
- CommandException
ModelException
java.io.IOException
public int write(Command command)
command
- public int flush(java.io.PrintWriter f)
f
-