public class ElemCup extends Object
对象序列化和反序列化工具
反序列化 向杯子中注入水
序列化把杯子中的水倒出
| 限定符和类型 | 字段和说明 |
|---|---|
static boolean |
ENABLE_DEBUG_PRINT
是否允许调试模式输出XML内容
true - 开启,XML含有空格和换行
false - 关闭。
|
| 构造器和说明 |
|---|
ElemCup() |
public static boolean ENABLE_DEBUG_PRINT
true - 开启,XML含有空格和换行 false - 关闭。XML采用紧凑模式输出,(默认)
public static org.dom4j.Element inject(Path file) throws org.dom4j.DocumentException
file - 文件路径对象org.dom4j.DocumentException - 文件解析异常public static void dump(org.dom4j.Element e,
Path to)
throws IOException
e - 文档对象to - 目标目录IOException - IO异常public static void dumpUpNS(org.dom4j.Element e,
Path to)
throws IOException
命名空间为 Const.OFD_NAMESPACE
e - 元素to - 存储位置IOException - IO异常public static byte[] dump(org.dom4j.Element e)
throws IOException
e - 元素IOException - IO异常Copyright © 2023. All rights reserved.