ojvm.loading.instructions
Class InstructionInputStream
java.lang.Object
|
+--ojvm.loading.ClassFileInputStream
|
+--ojvm.loading.instructions.InstructionInputStream
- public class InstructionInputStream
- extends ClassFileInputStream
A specialized input stream for reading byte arrays of
instructions. Compared to ClassInputStream, the new functionality
is to keep track of how many bytes were read so far so that we can
conveniently deal with instructions that must be aligned on a
4-byte boundary.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
InstructionInputStream
public InstructionInputStream(byte[] instructionArray,
java.lang.String filename)
getByteArrayLength
public int getByteArrayLength()
skipBytes
public void skipBytes(int len)
throws ClassFileInputStreamE
- Overrides:
- skipBytes in class ClassFileInputStream
readU1
public int readU1()
throws ClassFileInputStreamE
- Overrides:
- readU1 in class ClassFileInputStream
readU2
public int readU2()
throws ClassFileInputStreamE
- Overrides:
- readU2 in class ClassFileInputStream
readU4
public int readU4()
throws ClassFileInputStreamE
- Overrides:
- readU4 in class ClassFileInputStream
readByte
public byte readByte()
throws ClassFileInputStreamE
- Overrides:
- readByte in class ClassFileInputStream
readShort
public short readShort()
throws ClassFileInputStreamE
- Overrides:
- readShort in class ClassFileInputStream
readInt
public int readInt()
throws ClassFileInputStreamE
- Overrides:
- readInt in class ClassFileInputStream