public class XMLConfigFileParser extends AbstractConfigFileParser
IConfigFileParser.Attribute, IConfigFileParser.Category, IConfigFileParser.Property
DEFAULT_CATEGORY_NAME, TAG_NAME_ATTRIBUTES, TAG_NAME_CATEGORIES, TAG_NAME_CATEGORY, TAG_NAME_ITEM, TAG_NAME_PROPERTIES, TAG_NAME_PROPERTY, TAG_NAME_VALUE
Constructor and Description |
---|
XMLConfigFileParser(File file) |
XMLConfigFileParser(InputStream inputStream) |
XMLConfigFileParser(Node node) |
XMLConfigFileParser(URL url) |
Modifier and Type | Method and Description |
---|---|
void |
onLoad()
配置文件分析过程
|
void |
writeTo(File targetFile)
将配置文件内容写入到目标文件
|
void |
writeTo(OutputStream outputStream)
将配置文件内容写入到输出流
|
getAttribute, getAttributes, getCategories, getCategory, getDefaultCategory, isSorted, load, toJson
public XMLConfigFileParser(File file) throws ParserConfigurationException, IOException, SAXException
public XMLConfigFileParser(InputStream inputStream) throws ParserConfigurationException, IOException, SAXException
public XMLConfigFileParser(URL url) throws ParserConfigurationException, IOException, SAXException
public XMLConfigFileParser(Node node)
public void onLoad()
AbstractConfigFileParser
onLoad
in class AbstractConfigFileParser
public void writeTo(File targetFile) throws IOException
IConfigFileParser
targetFile
- 目标文件IOException
- 可能产生的IO异常public void writeTo(OutputStream outputStream) throws IOException
IConfigFileParser
outputStream
- 目标输出流IOException
- 可能产生的IO异常Copyright © 2022. All rights reserved.