From 3d0f568ed223c82684f5d49b3bccd5fdd5892095 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Thu, 29 Aug 2019 19:20:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A6=86=E7=9B=96xmlkit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/xml/XmlKit.java | 47 +++++-------------- 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index 03bd282..37efb56 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -7,10 +7,6 @@ import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLableReader; -import com.fr.stable.xml.*; -import com.fr.general.xml.GeneralXMLTools; - - import java.io.InputStream; /** @@ -20,24 +16,24 @@ public class XmlKit { /** * 从输入流中读取对象 * - XMLTools.readInputStreamXML(read, in); - } + * @param read xml读取对象 + * @param in xml输入流 + */ + public static void readInputStreamXML(XMLReadable read, InputStream in) throws Exception { + XMLTools.readInputStreamXML(read, in); + } - /** + /** * 将xml读取为具体的java对象 * * @param reader xml读取器 * @return java对象 */ - + public static XMLable readXMLable(XMLableReader reader) { + return GeneralXMLTools.readXMLable(reader); + } - /** - * 将java对象写为xml文件 - * - * @param writer xml写入器 - * @param xml 实际java对象 - * @param tagName xml标签名 /** * 将java对象写为xml文件 * @@ -45,30 +41,9 @@ public class XmlKit { * @param xml 实际java对象 * @param tagName xml标签名 */ - public static void readInputStreamXML(XMLReadable xmlReadable, InputStream inputStream) throws Exception { - XMLTools.readInputStreamXML(xmlReadable, inputStream); - } - /** - * 从输入源中读取xml - * @param reader 输入源 - * @return xml文件 - * - */ - public static XMLable readXMLable(XMLableReader reader) { - return GeneralXMLTools.readXMLable(reader); - } - /** - * 写XMLable - * @param writer 输出源 - * @param xml xml文件 - * @param tagName 标签名 - * @return 节点名 - * - */ public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { GeneralXMLTools.writeXMLable(writer, xml, tagName); } - -} \ No newline at end of file +}