outLazy = new DataOutputStream(new FileOutputStream(lazyFile));
fosLazy = new FileOutputStream(lazyFile); outLazy = new DataOutputStream(fosLazy);
	public void saveState(StateImpl state, File stateFile, File lazyFile) throws IOException {		DataOutputStream outLazy = null;		DataOutputStream outState = null;		try {			// first clear the System exports because we don't want to persist them in the system			// bundles bundle description data			state.setSystemExports(null);			BundleDescription[] bundles = state.getBundles();			StateHelperImpl.getInstance().sortBundles(bundles);			// need to prime the object table with all bundles			// this allows us to write only indexes to bundles in the lazy data			for (int i = 0; i < bundles.length; i++)				addToObjectTable(bundles[i]);			// first write the lazy data to get the offsets and sizes to the lazy data			outLazy = new DataOutputStream(new FileOutputStream(lazyFile));			for (int i = 0; i < bundles.length; i++)				writeBundleDescriptionLazyData(bundles[i], outLazy);			// now write the state data			outState = new DataOutputStream(new FileOutputStream(stateFile));			outState.write(StateReader.STATE_CACHE_VERSION);			if (writePrefix(state, outState))				return;			outState.writeLong(state.getTimeStamp());			Dictionary props = state.getPlatformProperties();			outState.writeInt(StateImpl.PROPS.length);			for (int i = 0; i < StateImpl.PROPS.length; i++)				writePlatformProp(props.get(StateImpl.PROPS[i]), outState);			outState.writeInt(bundles.length);			if (bundles.length == 0)				return;			for (int i = 0; i < bundles.length; i++)				// write out each bundle with the force flag set to make sure				// the data is written at least once in the non-lazy state data				writeBundleDescription(bundles[i], outState, true);			outState.writeBoolean(state.isResolved());		} finally {			if (outLazy != null)				try {					outLazy.close();				} catch (IOException e) {					// do nothing				}			if (outState != null)				try {					outState.close();				} catch (IOException e) {					// do nothing				}		}	}