if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Error writing framework metadata: " + e.getMessage()); Debug.printStackTrace(e); }
frameworkLog.log(new FrameworkEvent(FrameworkEvent.ERROR,context.getBundle(),e));
	public void saveMetaData() {		File metadata = LocationManager.getConfigurationFile(LocationManager.BUNDLE_DATA_FILE);		// the cache and the state match		if (timeStamp == stateManager.getSystemState().getTimeStamp())			return;		try {			DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(metadata)));			try {				out.writeByte(BUNDLEDATA_VERSION);				out.writeLong(stateManager.getSystemState().getTimeStamp());				out.writeUTF(installURL);				out.writeInt(initialBundleStartLevel);				out.writeLong(nextId);				Bundle[] bundles = context.getBundles();				out.writeInt(bundles.length);				for (int i = 0; i < bundles.length; i++) {					long id = bundles[i].getBundleId();					out.writeLong(id);					if (id != 0) {						BundleData data = ((org.eclipse.osgi.framework.internal.core.AbstractBundle) bundles[i]).getBundleData();						saveMetaDataFor(data, out);					}				}			} finally {				out.close();			}		} catch (IOException e) {			if (Debug.DEBUG && Debug.DEBUG_GENERAL) {				Debug.println("Error writing framework metadata: " + e.getMessage()); //$NON-NLS-1$ 				Debug.printStackTrace(e);			}		}	}