dioscuri
Class IO

java.lang.Object
  extended by dioscuri.IO

public class IO
extends java.lang.Object

Interface for user to interact with emulator


Field Summary
 java.lang.String imageFilename
           
 
Constructor Summary
IO()
          Class constructor
 
Method Summary
 void exportBinaryStream(java.lang.String filename, java.lang.String data)
          Exports data from emulator to the file system in given filename.
 java.lang.String[] getArguments()
          Returns arguments which may have been set during getCommand
 int getCommand()
          Parses an input string into commands along with their arguments, execute a command if recognised, otherwise ignore.
 java.lang.String getInput()
          Gets input from standard input and returns it as string.
 byte[] importBinaryStream(java.lang.String filename)
          Fetches data from input stream and returns it as a byte array.
 void setOutput(java.lang.String string)
          Sets given string to standard output.
 java.lang.String toString()
          Returns a string representation of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

imageFilename

public java.lang.String imageFilename
Constructor Detail

IO

public IO()
Class constructor

Method Detail

importBinaryStream

public byte[] importBinaryStream(java.lang.String filename)
                          throws java.io.IOException
Fetches data from input stream and returns it as a byte array.

Parameters:
filename -
Returns:
byte[] byte array containing machinecode
Throws:
java.io.IOException

exportBinaryStream

public void exportBinaryStream(java.lang.String filename,
                               java.lang.String data)
                        throws java.io.IOException
Exports data from emulator to the file system in given filename.

Parameters:
filename -
data -
Throws:
java.io.IOException

getInput

public java.lang.String getInput()
Gets input from standard input and returns it as string.

Returns:
string containing input line

setOutput

public void setOutput(java.lang.String string)
Sets given string to standard output.

Parameters:
string -

getCommand

public int getCommand()
Parses an input string into commands along with their arguments, execute a command if recognised, otherwise ignore.

Returns:
-

getArguments

public java.lang.String[] getArguments()
Returns arguments which may have been set during getCommand

Returns:
string[] with arguments

toString

public java.lang.String toString()
Returns a string representation of this class

Overrides:
toString in class java.lang.Object
Returns:
string with help information