Here you can find the source of loadLastExpInfo(String lastExpFileName)
public static int[] loadLastExpInfo(String lastExpFileName) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class Main { public static int[] loadLastExpInfo(String lastExpFileName) throws IOException { int num_user = 0; int type_spd = 0; int exp_id = 0; String line;/*from w w w . j a va 2s .c o m*/ File lastExpFile = new File(lastExpFileName); FileReader expFileReader = new FileReader(lastExpFile); BufferedReader expBufferedReader = new BufferedReader(expFileReader); try { while ((line = expBufferedReader.readLine()) != null) { String[] lines = line.split(" "); if (lines.length >= 2) { if (lines[0].toUpperCase().equals("NUM_USER") == true) { num_user = Integer.parseInt(lines[1]); } if (lines[0].toUpperCase().equals("TYPE_SPD") == true) { type_spd = Integer.parseInt(lines[1]); } if (lines[0].toUpperCase().equals("EXP_ID") == true) { exp_id = Integer.parseInt(lines[1]); } } } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } expBufferedReader.close(); int[] res = new int[3]; res[0] = num_user; res[1] = type_spd; res[2] = exp_id; return res; } }