use of com.iCo6.IO.mini.file.Manager in project Core by iConomy.
the class Mini method read.
private void read(boolean pushed) {
this.Database = new Manager(this.folder, this.database, true);
this.Database.removeDuplicates();
this.Database.read();
this.Indexes = new LinkedHashMap<String, Arguments>();
if (pushed)
this.pushedIndexes = new LinkedHashMap<String, Arguments>();
for (String line : this.Database.getLines()) {
if (line.trim().isEmpty())
continue;
String[] parsed = trim(line.trim().split(Dict.SPACER));
if (parsed[0].contains(Dict.ARGUMENT_SPLIT) || parsed[0].isEmpty())
continue;
Arguments entry = new Arguments(parseIndice(parsed[0]));
for (String item : parsed) {
if (!item.contains(Dict.ARGUMENT_SPLIT))
continue;
String[] map = trim(item.split(Dict.ARGUMENT_SPLIT, 2));
String key = map[0], value = map[1];
if (key == null)
continue;
entry.setValue(key, value);
}
this.Indexes.put(parseIndice(parsed[0]), entry);
}
}
Aggregations