src/main/java/net/matrix/app/message/CodedMessages.java
public static void save(final List<CodedMessage> messageList, final OutputStream writer)
		throws CodedMessageException {
		try {
			Document document = save0(messageList);
			Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
			transformer.transform(new DOMSource(document), new StreamResult(writer));
		} catch (TransformerException e) {
			throw new CodedMessageException(e, "CodedMessage.SaveXMLError");
		}
	}
public static void save(final List<CodedMessage> messageList, final OutputStream writer)
		throws CodedMessageException {
		try {
			Document document = save0(messageList);
			Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
			transformer.transform(new DOMSource(document), new StreamResult(writer));
		} catch (TransformerException e) {
			throw new CodedMessageException(e, "CodedMessage.SaveXMLError");
		}
	}
保存到文件。

@param messageList
消息记录组
@param writer
输出流
@throws CodedMessageException
操作异常