StateWriter writer = new StateWriter(); writer.saveState(systemState, output);
factory.writeState(systemState, output);
	private void writeState() throws IOException {		if (systemState == null)			return;		if (stateLocation.isFile() && lastTimeStamp == systemState.getTimeStamp())			return;		DataOutputStream output = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(stateLocation)));		StateWriter writer = new StateWriter();		writer.saveState(systemState, output);	}