Package java.io

Examples of java.io.DataInputStream.readUnsignedShort()


                + "- probably not a Java class file.");
        }

        // right we have a good looking class file.
        int minorVersion = classStream.readUnsignedShort();
        int majorVersion = classStream.readUnsignedShort();

        // read the constant pool in and resolve it
        constantPool = new ConstantPool();

        constantPool.read(classStream);
View Full Code Here


        constantPool = new ConstantPool();

        constantPool.read(classStream);
        constantPool.resolve();

        int accessFlags = classStream.readUnsignedShort();
        int thisClassIndex = classStream.readUnsignedShort();
        int superClassIndex = classStream.readUnsignedShort();
        ClassCPInfo classInfo
            = (ClassCPInfo) constantPool.getEntry(thisClassIndex);
        className  = classInfo.getClassName();
View Full Code Here

        constantPool.read(classStream);
        constantPool.resolve();

        int accessFlags = classStream.readUnsignedShort();
        int thisClassIndex = classStream.readUnsignedShort();
        int superClassIndex = classStream.readUnsignedShort();
        ClassCPInfo classInfo
            = (ClassCPInfo) constantPool.getEntry(thisClassIndex);
        className  = classInfo.getClassName();
    }
View Full Code Here

        constantPool.read(classStream);
        constantPool.resolve();

        int accessFlags = classStream.readUnsignedShort();
        int thisClassIndex = classStream.readUnsignedShort();
        int superClassIndex = classStream.readUnsignedShort();
        ClassCPInfo classInfo
            = (ClassCPInfo) constantPool.getEntry(thisClassIndex);
        className  = classInfo.getClassName();
    }
View Full Code Here

        int numFields = dis.readShort();
        for (int i = 0; i < numFields; i++) {
            // 3 short: access flags, name index, descriptor index
            dis.skip(2 * 3);
            // attribute list...
            int attributes_count = dis.readUnsignedShort();
            for (int j = 0; j < attributes_count; j++) {
                dis.skipBytes(2); // skip attr_id (short)
                int len = dis.readInt();
                dis.skipBytes(len);
            }
View Full Code Here

            methods[i] = new MethodInfo();
            methods[i].read(constantPool, dis);
        }

        // get interesting attributes.
        int attributes_count = dis.readUnsignedShort();
        for (int j = 0; j < attributes_count; j++) {
            int attr_id = dis.readShort();
            int len = dis.readInt();
            String attr_name = Utils.getUTF8Value(constantPool, attr_id);
            if (AttributeInfo.SOURCE_FILE.equals(attr_name)) {
View Full Code Here

                        case FSTORE:
                        case ASTORE:
                        case LSTORE:
                        case DSTORE:
                        case RET:
                            registerOperand = byteStream.readUnsignedShort();
                            i += 2;
                            break;
                        case IINC:
                            registerOperand = byteStream.readUnsignedShort();
                            i += 2;
View Full Code Here

                        case RET:
                            registerOperand = byteStream.readUnsignedShort();
                            i += 2;
                            break;
                        case IINC:
                            registerOperand = byteStream.readUnsignedShort();
                            i += 2;
                            intConstant = byteStream.readShort();
                            i += 2;
                            break;
                        default:
View Full Code Here

                             */
                            i++;
                            break;
                        case T_SHORT:
                            if (unsigned) {
                                v = byteStream.readUnsignedShort();
                            } else {
                                v = byteStream.readShort();
                            }
                            i += 2;
                            break;
View Full Code Here

                        continue;
                    }

                    DataInputStream zipIn = new DataInputStream(z.getInputStream(ze));
                    int magic = zipIn.readInt();
                    int minorVersion = zipIn.readUnsignedShort();
                    //                    int majorVersion = zipIn.readUnsignedShort();
                    if (magic != 0xCAFEBABE) {
                        System.out.printf("bad magic %x: %s %s%n", magic, jarFileName, name);
                        fail = true;
                    } else if (minorVersion >= 60) {
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.