我正在阅读android中的.properties
文件,该文件存储在assets文件夹中。我的.properties
文件有近8000-9000个键值对。装载时间大约需要4分钟。以下是我阅读.properties
文件的代码。
Properties props = new Properties();
AssetManager assets = resources.getAssets();
InputStream inputStream = assets.open("details.properties");
props.load(inputStream);
执行第props.load(inputStream)
行时,需要将近4分钟才能完成。我正在使用Eclipse并在开发人员模式下在MOTO G mobile中执行我的代码。
以下是我的示例.properties
文件值。
AB=HELLO
CD=WORLD
像这样有8000个键值对
请告诉我代码中是否有任何问题或以其他任何方式快速完成。谢谢!
答案 0 :(得分:0)