### Question:
ClassReader { public static Instruction[] readByteCode(byte[] byteCode, ConstantPool constantPool) throws IOException { List<Instruction> instructions = new ArrayList<>(); try (MyDataInputStream stm = new MyDataInputStream(new MyByteArrayInputStream(byteCode))) { while (stm.available() > 0) { int opCode = stm.readUnsignedByte(); try { Instruction inst = InstructionReader.read(opCode, stm, constantPool); if (inst == null) { System.out.println(Integer.toHexString(opCode)); break; } instructions.add(inst); } catch (java.lang.Exception e) { e.printStackTrace(); } } } Instruction[] ret = new Instruction[instructions.size()]; instructions.toArray(ret); return ret; }  static ClassFile read(String path); static ClassFile read(DataInputStream is); static Instruction[] readByteCode(byte[] byteCode, ConstantPool constantPool);  }### Answer:
@Test public void testReadInst_main() throws IOException { String main = "033c043d1c100aa3000d1b1c603c840201a7fff3b1"; byte[] bytes = toBytes(main); Instruction[] instructions = ClassReader.readByteCode(bytes, null); assertEquals(14, instructions.length); }