Here you can find the source of loadNumUsers(String fileName)
public static int[] loadNumUsers(String fileName) 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[] loadNumUsers(String fileName) throws IOException { File file = new File(fileName); FileReader fileReader = new FileReader(file); BufferedReader bufferedReader = new BufferedReader(fileReader); String line;/*from www. j av a 2s . c o m*/ try { if ((line = bufferedReader.readLine()) != null) { String[] tmp_res = line.split(" "); int[] res = new int[tmp_res.length]; for (int i = 0; i < tmp_res.length; i++) { res[i] = Integer.parseInt(tmp_res[i]); } bufferedReader.close(); return res; } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }