From 9462a4b3cb543ea109c6cd1c9298ec341c19e046 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Thu, 29 Aug 2019 18:22:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/xml/XmlKit.java | 56 ++++++++----------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index a9edb7f..c416cfa 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -1,57 +1,47 @@ package com.fanruan.api.xml; -import com.fr.data.core.DataCoreXmlUtils; -import com.fr.data.impl.Connection; -import com.fr.stable.xml.*; import com.fr.general.xml.GeneralXMLTools; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLTools; +import com.fr.stable.xml.XMLable; +import com.fr.stable.xml.XMLableReader; import java.io.InputStream; +/** + * xml读写相关类 + */ public class XmlKit { /** * 从输入流中读取对象 - * @param xmlReadable xml读取对象 - * @param inputStream xml输入流 * + * @param read xml读取对象 + * @param in xml输入流 */ - public static void readInputStreamXML(XMLReadable xmlReadable, InputStream inputStream) throws Exception { - XMLTools.readInputStreamXML(xmlReadable, inputStream); + public static void readInputStreamXML(XMLReadable read, InputStream in) throws Exception { + XMLTools.readInputStreamXML(read, in); } + + /** - * 从输入源中读取xml - * @param reader 输入源 - * @return xml文件 + * 将xml读取为具体的java对象 * + * @param reader xml读取器 + * @return java对象 */ public static XMLable readXMLable(XMLableReader reader) { return GeneralXMLTools.readXMLable(reader); } + /** - * 写XMLable - * @param writer 输出源 - * @param xml xml文件 - * @param tagName 标签名 - * @return 节点名 + * 将java对象写为xml文件 * + * @param writer xml写入器 + * @param xml 实际java对象 + * @param tagName xml标签名 */ public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { GeneralXMLTools.writeXMLable(writer, xml, tagName); } - /** - * 读取connection对象 - * @param reader XMLableReader对象 - * @return Connection对象 - * - */ - public static Connection readXMLConnectionMap(XMLableReader reader) { - return DataCoreXmlUtils.readXMLConnectionMap(reader); - } - /** - * 写connection对象 - * @param writer XMLPrintWriter对象 - * @param connection Connection对象 - */ - public static void writeXMLConnection(XMLPrintWriter writer, Connection connection) { - DataCoreXmlUtils.writeXMLConnection(writer, connection); - } -} +} \ No newline at end of file