⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlutil.java

📁 电子邮件收发系统,采用各种技术进行研究开发适用大学生课程设计
💻 JAVA
字号:
package net.meybo.util;

import java.io.*;
import org.dom4j.*;
/**
 * 处理 XML 的工具类,它只被 XMLTool 类使用
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company:脉博软件 </p>
 * @author:阚吉彬
 * @version 1.0
 */
class XMLUtil{

    XMLUtil(){
    }

    protected static void toXmlFile(Document xmlJDoc, String encoding, String fileName) throws FileNotFoundException, IOException {         
        FileWriter file=new FileWriter(fileName);
        xmlJDoc.write(file);
        file.close();       
    }


    protected static InputStream getInputStream(String xmlStr) throws Exception {
        return new ByteArrayInputStream(xmlStr.getBytes());
    }

    protected static Document buildDocument(Element el) {
        Document doc = null;
        doc=DocumentHelper.createDocument(el);
        return doc;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -