0

我在 Android 手机的 SD 卡中有一个文本文件,在该文件中有多个列通过应用程序。我想提取每列数据并放入不同的 2 数组。由于我是应用程序开发的新手,请帮助我或提供源代码。

提前致谢。

4

1 回答 1

0

All you have to do it's to use something like that :

try{
   InputStream flux=new FileInputStream("Your_File"); 
   InputStreamReader lecture=new InputStreamReader(flux);
   BufferedReader buff=new BufferedReader(lecture);
   String ligne;

   while ((ligne=buff.readLine())!=null){
       //Do the action that you want to do for each ligne.
       //If I well understand you need, split each ligne to give each columns.
   }
   buff.close(); 
   }        
   catch (Exception e){
   System.out.println(e.toString());
}

I hope you that's what you needed.

于 2013-03-08T19:17:40.473 回答