Parameter param = new Parameter();
try {
fileInput = new FileInputStream(new File(str));
br = new BufferedReader(
new InputStreamReader( fileInput ));
String line;
while( (line = br.readLine()) != null ) {
if( line.startsWith("URL") == true && line.indexOf("=") >= 3) {
int f = line.indexOf("=");
String urlstring = line.substring(f+1);
urlstring.trim();
param.url = new URL(urlstring);
}
else if( line.startsWith("METHOD") == true && line.indexOf("=") >= 3) {
int f = line.indexOf("=");
String method = line.substring(f+1);
method.trim();
param.method = method;
}
else if( line.indexOf("=") != -1 ) {
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/