Examples of DescriptorComponent


Examples of fr.xlim.ssd.capmanipulator.library.DescriptorComponent

                break;

            case DESCRIPTOR_COMPONENT:
                logger.debug(LogType.COMPONENT.getMarker(), "Found Descriptor Component");
                DescriptorComponent descr = (DescriptorComponent) new DescriptorComponentRead().load(inputStream);
                capFile.getComponents().add(descr);

                // if we've the descriptor Component we use it
                // to get our offset list
                // it allows us to be sure of having every offsets
                // needed

                // we'll get the offset of each methods defined in
                // each ClassDescriptorInfo
                for (ClassDescriptorInfo c : descr.getClasses()) {

                    for (MethodDescriptorInfo met : c.getMethods()) {
                        Converter.addShortToArray(lOffset, met.getMethodOffset());
                    }
                }
View Full Code Here

Examples of fr.xlim.ssd.capmanipulator.library.DescriptorComponent

public class DescriptorComponentRead extends ComponentRead {

    @Override
    public Component load(CapInputStream in) throws UnableToReadCapFileException {

        DescriptorComponent descriptorComponent = new DescriptorComponent();

        super.load((byte) ComponentEnum.DESCRIPTOR_COMPONENT.getValue(), in, descriptorComponent);

        // we reset the count of byte read to zero
        in.resetCount();

        descriptorComponent.setClassCount(in.readByte());


        descriptorComponent.setClasses(new ArrayList<ClassDescriptorInfo>(descriptorComponent.getClassCount()));

        for (int i = 0; i < descriptorComponent.getClassCount(); i++) {
            ClassDescriptorInfo cDes = new ClassDescriptorInfoRead().load(in);
            descriptorComponent.getClasses().add(cDes);
        }

        TypeDescriptorInfo typeDescriptorInfo = new TypeDescriptorInfoRead().load(in, descriptorComponent);
        descriptorComponent.setTypes(typeDescriptorInfo);

        checkSize(in, descriptorComponent);

        return descriptorComponent;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.