superClass = readClass(data.readUnsignedShort(), items);
int superclassIndex = data.readUnsignedShort(); superClass = (superclassIndex == 0) ? null : readClass(superclassIndex, items);
    public ClassHeaderReader(InputStream in) throws IOException {        try {            DataInputStream data = new DataInputStream(in);            int magic = data.readInt();            int minorVersion = data.readUnsignedShort();            int majorVersion = data.readUnsignedShort();            if (magic != 0xCAFEBABE)                throw new IOException("Bad magic number");            // TODO: check version                        int constant_pool_count = data.readUnsignedShort();            Map items = new TreeMap();            for (int i = 1; i < constant_pool_count; i++) {                int tag = data.readUnsignedByte();                switch (tag) {                case 9:  // Fieldref                case 10: // Methodref                case 11: // InterfaceMethodref                case 3:  // Integer                case 4:  // Float                case 12: // NameAndType                    skipFully(data, 4);                    break;                case 5:  // Long                case 6:  // Double                    skipFully(data, 8);                    i++;                    break;                case 1:  // Utf8                    items.put(new Integer(i), data.readUTF());                    break;                case 7:  // Class                    items.put(new Integer(i), new Integer(data.readUnsignedShort()));                    break;                case 8:  // String                    skipFully(data, 2);                    break;                default:                    throw new IllegalStateException("Unknown constant pool tag " + tag);                }            }            access = data.readUnsignedShort();            thisClass = readClass(data.readUnsignedShort(), items);            superClass = readClass(data.readUnsignedShort(), items);            int interfaces_count = data.readUnsignedShort();            interfaces = new String[interfaces_count];            for (int i = 0; i < interfaces_count; i++) {                interfaces[i] = readClass(data.readUnsignedShort(), items);            }        } finally {            in.close();        }    }