HostSpecificationImpl hostSpec = (HostSpecificationImpl) result.getHost(); if (hostSpec != null) { BundleDescription[] hosts = hostSpec.getHosts(); if (hosts != null) { for (int i = 0; i < hosts.length; i++) ((BundleDescriptionImpl) hosts[i]).addDependency(result, false); } }
	private BundleDescriptionImpl readBundleDescription(DataInputStream in) throws IOException {		byte tag = readTag(in);		if (tag == NULL)			return null;		if (tag == INDEX)			return (BundleDescriptionImpl) getFromObjectTable(in.readInt());		// first read in non-lazy loaded data		BundleDescriptionImpl result = new BundleDescriptionImpl();		addToObjectTable(result, in.readInt());		result.setBundleId(in.readLong());		readBaseDescription(result, in);		result.setLazyDataOffset(in.readInt());		result.setLazyDataSize(in.readInt());		result.setStateBit(BundleDescriptionImpl.RESOLVED, in.readBoolean());		result.setStateBit(BundleDescriptionImpl.SINGLETON, in.readBoolean());		result.setStateBit(BundleDescriptionImpl.HAS_DYNAMICIMPORT, in.readBoolean());		result.setStateBit(BundleDescriptionImpl.ATTACH_FRAGMENTS, in.readBoolean());		result.setStateBit(BundleDescriptionImpl.DYNAMIC_FRAGMENTS, in.readBoolean());		result.setHost(readHostSpec(in));		// set the bundle dependencies from imports and requires and hosts.		int numDeps = in.readInt();		if (numDeps > 0) {			BundleDescription[] deps = new BundleDescription[numDeps];			for (int i = 0; i < numDeps; i++)				deps[i] = readBundleDescription(in);			result.addDependencies(deps, false); // no need to check dups; we already know there are none when we resolved (bug 152900)		}		// No need to set the dependencies between fragment and hosts; that was already done in the above loop (bug 152900)		// the rest is lazy loaded data		result.setFullyLoaded(false);		return result;	}