//获取文本内容publicstaticListgetText(StringfilePath){Listsimples=newArrayList();try{FileReaderreader=newFileReader(filePath);BufferedReaderbfRead...
// 获取文本内容
public static List getText(String filePath) {
List simples =
new ArrayList();
try {
FileReader reader =
new FileReader(filePath);
BufferedReader bfReader =
new BufferedReader(reader);
String text =
null;
while ((text = bfReader.readLine()) != null) {
String[] texts = text.split(
"");
Simple simple =
new Simple();
simple.
Scheduled_title= texts[0];
simple.
Scheduled_execute_time = texts[1];
simple.
runTime = texts[2];
simples.add(simple);
}
}
catch (Exception e) {
e.printStackTrace();
}
return simples;
}
Input Error: java.lang.ArrayIndexOutOfBoundsException:1
at.com.CenDB.FileInsert.getText(FileInsert .java ;41)
at.com.CenDB.main(FileInsert .java ;53)
能不能帮我解决下问题?
展开