(Schema schema)
| 78 | protected abstract Schema checkHeader() throws IOException; |
| 79 | |
| 80 | protected Bytecode readItem(Schema schema) throws IOException { |
| 81 | // read opcode |
| 82 | int opcode = in.read_u8(); |
| 83 | // Write operands |
| 84 | int[] operands = readOperands(schema,opcode); |
| 85 | // Write data (if any) |
| 86 | byte[] data = readData(schema,opcode); |
| 87 | // Pad to next byte boundary |
| 88 | in.pad_u8(); |
| 89 | // |
| 90 | return new Bytecode(opcode,operands,data); |
| 91 | } |
| 92 | |
| 93 | protected int[] readOperands(Schema schema, int opcode) throws IOException { |
| 94 | // Determine operand layout |
no test coverage detected