Package fr.xlim.ssd.capmanipulator.library

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


     *
     * @throws java.io.IOException
     */
    public InterfaceInfo load(byte bitfield, CapInputStream in) throws UnableToReadCapFileException {

        InterfaceInfo interfaceInfo = new InterfaceInfo();

        interfaceInfo.setBitfield(bitfield);
        // the number of entries entries in the SuperInterfaces array
        // is in the second nibble of the bitField
        byte interfaceCount = (byte) (bitfield & 0x0F);

        // superInterfaces loading
        interfaceInfo.getSuperInterfaces().clear();

        for (int i = 0; i < interfaceCount; i++) {
            ClassRef c = new ClassRefRead().load(in);

            interfaceInfo.getSuperInterfaces().add(c);
        }

        // intefaceNameInfo loading (only if the bit remote is set in the flag)
        if ((bitfield & ClassComponent.ACC_REMOTE) >>> 5 == ClassComponent.ACC_REMOTE) {
            interfaceInfo.setInterfaceNameInfo(new InterfaceNameInfoRead().load(in));
        }
        {
            interfaceInfo.setInterfaceNameInfo(new InterfaceNameInfo());
        }

        return interfaceInfo;
    }
View Full Code Here


            byte buf = in.readByte();

            // if the most significant bit of buf is 1 it's an interfaceInfo
            // else it's a classInfo
            if ((buf & ClassComponent.ACC_INTERFACE) != 0) {
                InterfaceInfo intInf = new InterfaceInfoRead().load(buf, in);
                classComponent.getInterfaces().add(intInf);
            } else {
                ClassInfo classInf = new ClassInfoRead().load(buf, in);
                classComponent.getClasses().add(classInf);
            }
View Full Code Here

TOP

Related Classes of fr.xlim.ssd.capmanipulator.library.InterfaceInfo

Copyright © 2018 www.massapicom. 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.