public class OFDPageDeleter extends Object implements Closeable
该删除器仅删除文档树中的页面节点,不会删除相关资源和页面对象 Content.xml
| 构造器和说明 |
|---|
OFDPageDeleter(Path src,
Path out)
创建OFD文档页面删除器
|
public OFDPageDeleter(Path src, Path out) throws IOException, org.dom4j.DocumentException
src - OFD文件路径out - 删除后文件路径IOException - 文件解析异常org.dom4j.DocumentException - 文档结构无法解析public OFDPageDeleter delete(int... indexes)
indexes - 页面索引列表(从0起)public void close()
throws IOException
注意:请在所有操作完成后调用该方法,否则无法删除页面。
close 在接口中 Closeableclose 在接口中 AutoCloseableIOException - 文件读写异常Copyright © 2025. All rights reserved.