public class JSONConfigFileParser 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 |
---|
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, toJson
public JSONConfigFileParser(File file) throws IOException
IOException
public JSONConfigFileParser(InputStream inputStream) throws IOException
IOException
public JSONConfigFileParser(URL url) throws IOException
IOException
public JSONConfigFileParser(String jsonStr)
protected 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.