}  GenericDescription[] genericCapabilities = bundle.getGenericCapabilities(); if (genericCapabilities == null) out.writeInt(0); else { out.writeInt(genericCapabilities.length); for (int i = 0; i < genericCapabilities.length; i++) writeGenericDescription(genericCapabilities[i], out); }  GenericSpecification[] genericRequires = bundle.getGenericRequires(); if (genericRequires == null) out.writeInt(0); else { out.writeInt(genericRequires.length); for (int i = 0; i < genericRequires.length; i++) writeGenericSpecification(genericRequires[i], out);
	private void writeBundleDescriptionLazyData(BundleDescription bundle, DataOutputStream out) throws IOException {		int dataStart = out.size(); // save the offset of lazy data start		int index = getFromObjectTable(bundle);		((BundleDescriptionImpl) bundle).setLazyDataOffset(out.size());		out.writeInt(index);		writeStringOrNull(bundle.getLocation(), out);		writeStringOrNull(bundle.getPlatformFilter(), out);		ExportPackageDescription[] exports = bundle.getExportPackages();		out.writeInt(exports.length);		for (int i = 0; i < exports.length; i++)			writeExportPackageDesc((ExportPackageDescriptionImpl) exports[i], out);		ImportPackageSpecification[] imports = bundle.getImportPackages();		out.writeInt(imports.length);		for (int i = 0; i < imports.length; i++)			writeImportPackageSpec(imports[i], out);		BundleSpecification[] requiredBundles = bundle.getRequiredBundles();		out.writeInt(requiredBundles.length);		for (int i = 0; i < requiredBundles.length; i++)			writeBundleSpec((BundleSpecificationImpl) requiredBundles[i], out);		ExportPackageDescription[] selectedExports = bundle.getSelectedExports();		if (selectedExports == null) {			out.writeInt(0);		} else {			out.writeInt(selectedExports.length);			for (int i = 0; i < selectedExports.length; i++)				writeExportPackageDesc((ExportPackageDescriptionImpl) selectedExports[i], out);		}		ExportPackageDescription[] resolvedImports = bundle.getResolvedImports();		if (resolvedImports == null) {			out.writeInt(0);		} else {			out.writeInt(resolvedImports.length);			for (int i = 0; i < resolvedImports.length; i++)				writeExportPackageDesc((ExportPackageDescriptionImpl) resolvedImports[i], out);		}		BundleDescription[] resolvedRequires = bundle.getResolvedRequires();		if (resolvedRequires == null) {			out.writeInt(0);		} else {			out.writeInt(resolvedRequires.length);			for (int i = 0; i < resolvedRequires.length; i++)				writeBundleDescription(resolvedRequires[i], out, false);		}		String[] ees = bundle.getExecutionEnvironments();		out.writeInt(ees.length);		for (int i = 0; i < ees.length; i++)			writeStringOrNull(ees[i], out);		HashMap dynamicStamps = ((BundleDescriptionImpl)bundle).getDynamicStamps();		if (dynamicStamps == null)			out.writeInt(0);		else {			out.writeInt(dynamicStamps.size());			for (Iterator pkgs = dynamicStamps.keySet().iterator(); pkgs.hasNext();) {				String pkg = (String) pkgs.next();				writeStringOrNull(pkg, out);				out.writeLong(((Long)dynamicStamps.get(pkg)).longValue());			}		}		// save the size of the lazy data		((BundleDescriptionImpl) bundle).setLazyDataSize(out.size() - dataStart);	}