s = br.readLine();//这行怎么读取不到内容???

来源:互联网 发布:淘宝卖家商品打折 编辑:程序博客网 时间:2024/05/01 21:14

 File f = new File(path);
  FileReader fr = new FileReader(f);
  BufferedReader br = new BufferedReader(fr);
  String s;
  try
  {
   s = br.readLine();
   while (s != null)
   {
    s += s;
    text.setText(new String(s));
    System.out.println(s);    
    s = br.readLine();//这行怎么读取不到内容???
   }
   //text.setText(new String(s));
  } catch (IOException e)
  {
   System.out.println("打开出错");
  } finally

原创粉丝点击