public class JSONConfigFileParser extends AbstractConfigFileParser
IConfigFileParser.Attribute, IConfigFileParser.Category, IConfigFileParser.PropertyDEFAULT_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 |
|---|
JSONConfigFileParser(File file) |
JSONConfigFileParser(InputStream inputStream) |
JSONConfigFileParser(String jsonStr) |
JSONConfigFileParser(URL url) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onLoad()
配置文件分析过程
|
void |
writeTo(File targetFile)
将配置文件内容写入到目标文件
|
void |
writeTo(OutputStream outputStream)
将配置文件内容写入到输出流
|
getAttribute, getAttributes, getCategories, getCategory, getDefaultCategory, isSorted, load, toJsonpublic JSONConfigFileParser(File file) throws IOException
IOExceptionpublic JSONConfigFileParser(InputStream inputStream) throws IOException
IOExceptionpublic JSONConfigFileParser(URL url) throws IOException
IOExceptionpublic JSONConfigFileParser(String jsonStr)
protected void onLoad()
AbstractConfigFileParseronLoad in class AbstractConfigFileParserpublic void writeTo(File targetFile) throws IOException
IConfigFileParsertargetFile - 目标文件IOException - 可能产生的IO异常public void writeTo(OutputStream outputStream) throws IOException
IConfigFileParseroutputStream - 目标输出流IOException - 可能产生的IO异常Copyright © 2022. All rights reserved.