private static Vector stat_message=new Vector();
public static void getstatdate(String path)
{
File getche=new File(path);
try
{
BufferedReader br=new BufferedReader(new FileReader(getche));
String tmp=null;
try{
while((tmp=br.readLine())!=null)
{
stat_message.add(tmp);
}
}
catch(IOException ex1) {}
}
catch(FileNotFoundException ex) {}
}
读出文本文件内容
最新推荐文章于 2021-06-07 16:09:06 发布
本文介绍了一个简单的Java程序示例,该程序用于从指定路径读取文件内容,并将每一行文本添加到Vector集合中。此方法适用于需要批量处理文件行数据的应用场景。
2634

被折叠的 条评论
为什么被折叠?



