我有类似下面的情况:/**Getalistofrecords*/publicArrayListfoo()throwsBazException{//CreatetheliststaticArrayListrecords=newArrayList();//UseMyLibrarytoloadalistofrecordsfromthefileStringstr=SomeoneElsesLibrary.loadData(newFile("mydata.dat"),newDataLoader(){//willbecalledonceforeachrecordinthefileStringproc