private int[] readCodeFrom(InputStream in, ClassFile classFile)
			throws IOException {
		if (getOpCodesCount() != 0)
			throw new BadClassFileException();
		int codeLen = readInt(in);
		if (codeLen <= 0)
			throw new BadClassFileException();
		byte[] bytes = new byte[codeLen];
		readFully(in, bytes);
		ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
		int[] indices = new int[bytes.length + 1];
		for (int i = indices.length - 2; i > 0; i--) {
			indices[i] = -1;
		}
		try {
			int remain;
			while ((remain = bais.available()) > 0) {
				int op = readUnsignedByte(bais);
				OpByteCode opCode = OpCodeVar.decode(op, bais);
				int curPc = bytes.length - remain;
				indices[curPc] = opByteCodes.size();
				if (opCode == null) {
					opCode = OpCodeJump.decode(op, bais, curPc);
					if (opCode == null) {
						opCode = OpCodeSwitch.decode(op, bais, curPc);
						if (opCode == null) {
							opCode = OpCodeConst.decode(op, bais, classFile);
							if (opCode == null) {
								opCode = new OpCodeSimple(op);
							}
						}
					}
				}
				opByteCodes.addElement(opCode);
			}
		} catch (EOFException e) {
			throw new BadClassFileException();
		}
		indices[bytes.length] = opByteCodes.size();
		return indices;
	}