java怎么从循环中提取return 值 ,importdata中的return的值是null,但是想要return lines 的内容

package hotel1;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

import hotel.CloseStreamMethod;

public class ImportData{
public ArrayList roomsLists = new ArrayList();

public static void main(String[] args) {
ImportData ip = new ImportData();
ip.importRooms();
}

public String importData(){

File src  = new File("/Users/handsomeboy/eclipse-workspace/Coursework/src/hotel1/rooms.txt");

BufferedReader br = null;

String lines = null;
try {
    br = new BufferedReader(new FileReader(src));
    String line = null;
    while((line = br.readLine()) != null) {
        lines += line;
    }

} catch (IOException e) {
    e.printStackTrace();
} finally {
    CloseStreamMethod csm = new CloseStreamMethod();
    csm.close(br);
}
return lines;

}
public void importRooms() {

String[] content = importData().split("\n");
for (String row : content) {
    if(row != null) {
    String[] contents = row.split(",");
      if (contents.length == 5) {
        roomsLists.add(new Rooms(Integer.parseInt(contents[0]),
                RoomType.valueOf(contents[1].toUpperCase()),
                Double.parseDouble(contents[2]),
                Integer.parseInt(contents[3]),contents[4]));
      }
    }
}
System.out.println(roomsLists);

}
}

输出内容:
[]

文本内容:
101,double,80.00,2,own bathroom
102,double,80.00,2,own bathroom
103,twin,70.00,2,shared bathroom
104,twin,70.00,2,shared bathroom
201,double,80.00,2,own bathroom
202,single,70.00,1,own bathroom
301,family,90.00,4,own bathroom

这都有输出内容了吗,那有null。

你可以做个参考,这个lines就不是null

public static void main(String[] args) throws IOException{
        File file = new File("D:\\XMind\\tom.txt");
        BufferedReader br = null;
        String lines = null;
        try {
            br = new BufferedReader(new FileReader(file));
            String line = null;
            System.out.println("while:"+lines);

            while((line = br.readLine()) != null) {
                lines += line;
                System.out.println("while:"+lines);
            }

        } catch (IOException e) {
            e.printStackTrace();
        } 
        System.out.println(lines);
    }