	private void printToFileIfApplicable(Object doc,
			OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
		if (outputGenaratorParam.getParameters() != null) {
			if (outputGenaratorParam.getParameters().get("writeToFile") != null
					&& "true".equals(outputGenaratorParam.getParameters().get(
							"writeToFile"))) {
				String outFile = outputGenaratorParam.getParameters().get(
						"filePath");
				if (outFile != null) {
					try {
						writeFile(doc.toString(),outFile,fileName);
					} catch (IOException e) {
						throw new WsdlDocException(e);
					}
				}
			}
		}
	}

	private void printToFileIfApplicable(Object doc,
			OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
		if (outputGenaratorParam.getParameters() != null) {
			if (outputGenaratorParam.getParameters().get("writeToFile") != null
					&& "true".equals(outputGenaratorParam.getParameters().get(
							"writeToFile"))) {
				String outFile = outputGenaratorParam.getOutputDir();
				if (outFile != null) {
					try {
						writeFile(doc.toString(),outFile,fileName);
					} catch (IOException e) {
						throw new WsdlDocException(e);
					}
				}
			}
		}
	}
