int f = line.indexOf("=");
String key = line.substring(0, f-1);
String value = line.substring(f+1);
param.addPair(key.trim(), value.trim());
}
}
fileInput.close();
br.close();
}
catch(FileNotFoundException e) {
System.out.println("File " + str + " not found.");
}
catch(NullPointerException e) {
}
catch(IOException e) {
System.out.println(e);
}
return param;
}
public static void main(String[] args) {
int i;
int j;
Parameter param;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/