*/
public ClassDescriptorInfo load(CapInputStream in) throws UnableToReadCapFileException {
ClassRefRead classRefRead = new ClassRefRead();
ClassDescriptorInfo classDescriptorInfo = new ClassDescriptorInfo();
classDescriptorInfo.setToken(in.readByte());
classDescriptorInfo.setAccesFlags(in.readByte());
// This_class_ref reading
classDescriptorInfo.setThisClassRef(classRefRead.load(in));
classDescriptorInfo.setInterfaceCount(in.readByte());
classDescriptorInfo.setFieldCount(in.readShort());
classDescriptorInfo.setMethodCount(in.readShort());
//reading of the interfaces
classDescriptorInfo.setInterfaces(new ArrayList<ClassRef>(classDescriptorInfo.getInterfaceCount()));
for (int i = 0; i < classDescriptorInfo.getInterfaceCount(); i++) {
classDescriptorInfo.getInterfaces().add(classRefRead.load(in));
}
//reading of the fields
classDescriptorInfo.setFields(new ArrayList<FieldDescriptorInfo>(classDescriptorInfo.getFieldCount()));
for (int i = 0; i < classDescriptorInfo.getFieldCount(); i++) {
FieldDescriptorInfo fDes = new FieldDescriptorInfoRead().load(in);
classDescriptorInfo.getFields().add(fDes);
}
//reading of the methods
classDescriptorInfo.setMethods(new ArrayList<MethodDescriptorInfo>(classDescriptorInfo.getMethodCount()));
for (int i = 0; i < classDescriptorInfo.getMethodCount(); i++) {
MethodDescriptorInfo mDes = new MethodDescriptorInfoRead().load(in);
classDescriptorInfo.getMethods().add(mDes);
}
return classDescriptorInfo;
}