int fields_count = in.readUnsignedShort(); if (fields_count < 0 ) { throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry); } FieldDescriptor[] fieldDescriptorList = new FieldDescriptor[fields_count]; for (int i = 0; i < fields_count; i++) { fieldDescriptorList[i] = readField(thisClassDescriptor); }  int methods_count = in.readUnsignedShort(); if (methods_count < 0) { throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry); } MethodDescriptor[] methodDescriptorList = new MethodDescriptor[methods_count]; for (int i = 0; i < methods_count; i++) { methodDescriptorList[i] = readMethod(thisClassDescriptor); }     ClassDescriptor[] referencedClassDescriptorList = extractReferencedClasses();  classInfo.setFieldDescriptorList(fieldDescriptorList); classInfo.setMethodDescriptorList(methodDescriptorList); classInfo.setReferencedClassDescriptorList(referencedClassDescriptorList);
	public void parse(ClassInfo classInfo) throws InvalidClassFileFormatException {				try {			// Parse the class file			// See http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html						int magic = in.readInt();			int major_version = in.readUnsignedShort();			int minor_version = in.readUnsignedShort();			int constant_pool_count = in.readUnsignedShort();			constantPool = new Constant[constant_pool_count];			for (int i = 1; i < constantPool.length; i++) {				constantPool[i] = readConstant();				if (constantPool[i].tag == IClassConstants.CONSTANT_Double ||						constantPool[i].tag == IClassConstants.CONSTANT_Long) {					// Double and Long constants take up two constant pool entries					++i;				}			}						int access_flags = in.readUnsignedShort();			int this_class = in.readUnsignedShort();			ClassDescriptor thisClassDescriptor =				getClassDescriptor(this_class);			int super_class = in.readUnsignedShort();			ClassDescriptor superClassDescriptor =				getClassDescriptor(super_class);			int interfaces_count = in.readUnsignedShort();			if (interfaces_count < 0) {				throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);			}			ClassDescriptor[] interfaceDescriptorList = new ClassDescriptor[interfaces_count];			for (int i = 0; i < interfaceDescriptorList.length; i++) {				interfaceDescriptorList[i] = getClassDescriptor(in.readUnsignedShort());			}			classInfo.setClassDescriptor(thisClassDescriptor);			classInfo.setSuperclassDescriptor(superClassDescriptor);			classInfo.setInterfaceDescriptorList(interfaceDescriptorList);			classInfo.setCodeBaseEntry(codeBaseEntry);			classInfo.setAccessFlags(access_flags);						int fields_count = in.readUnsignedShort();			if (fields_count < 0 ) {				throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);			}			FieldDescriptor[] fieldDescriptorList = new FieldDescriptor[fields_count];			for (int i = 0; i < fields_count; i++) {				fieldDescriptorList[i] = readField(thisClassDescriptor);			}						int methods_count = in.readUnsignedShort();			if (methods_count < 0) {				throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);			}			MethodDescriptor[] methodDescriptorList = new MethodDescriptor[methods_count];			for (int i = 0; i < methods_count; i++) {				methodDescriptorList[i] = readMethod(thisClassDescriptor);			}						// Extract all references to other classes,			// both CONSTANT_Class entries and also referenced method			// signatures.			ClassDescriptor[] referencedClassDescriptorList = extractReferencedClasses();						classInfo.setFieldDescriptorList(fieldDescriptorList);			classInfo.setMethodDescriptorList(methodDescriptorList);			classInfo.setReferencedClassDescriptorList(referencedClassDescriptorList);		} catch (IOException e) {			throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry, e);		}			}