com.github.croesch.micro_debug.mic1.controlstore
Class MicroInstructionReader
java.lang.Object
com.github.croesch.micro_debug.mic1.controlstore.MicroInstructionReader
public final class MicroInstructionReader
- extends Object
Based on the implementation of Ray Ontko.
Is able to read bytes from InputStreams and to construct MicroInstructions with the given values.
- Since:
- Date: Nov 7, 2011
- Author:
- croesch
|
Field Summary |
static int |
MIC1_MAGIC_NUMBER
the magic number that is needed at the begin of a binary mic1-file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIC1_MAGIC_NUMBER
public static final int MIC1_MAGIC_NUMBER
- the magic number that is needed at the begin of a binary mic1-file
- See Also:
- Constant Field Values
read
public static MicroInstruction read(InputStream in)
throws IOException
- Reads five bytes from the given
InputStream and constructs one MicroInstruction. Invoke several
times to read the whole data in the stream.
- Parameters:
in - the inputstream to fetch five bytes from
- Returns:
- a
MicroInstruction constructed from the bytes read or null if there are less than five
bytes to read from the inputstream.
- Throws:
IOException - if something went wrong reading the given InputStream.- Since:
- Date: Nov 10, 2011
Copyright © 2012. All Rights Reserved.