代码拉取完成,页面将自动刷新
package com.forte.test;
import love.forte.minini.Ini;
import love.forte.minini.IniReader;
import love.forte.minini.reader.BufferedIniReader;
import java.io.InputStream;
/**
*
* Demo for read a ini file from stream
*
*/
public class Demo1 {
public static void main(String[] args) throws Exception {
// Get input stream from resources.
InputStream iniInput = Demo1.class.getClassLoader().getResourceAsStream("test.ini");
System.out.println(iniInput);
/*
If you want to change or use some of your own rules, you can see:
IniReader
BufferedIniReader
IniFormatterFactory (function implement: DefaultIniFormatter::new)
CommentElementFormatter
SectionElementFormatter
PropertyElementFormatter
*/
// Get ini reader by default reader: BufferedIniReader.
// By default, there is only this one implementation class. You can implement it independently.
IniReader ir = new BufferedIniReader();
// read to ini
Ini ini = ir.read(iniInput);
// show ini
System.out.println(ini);
// to properties and show
ini.toProperties().forEach((k, v) -> {
System.out.println(k + "=" + v);
});
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。