怎么快速的一行行的输出信息

如何快速的一行行的输出信息
比方说 我有很多文件夹
我要快速的产生一个个日志文件txt格式的
每一个日志文件对应一个文件夹,里面包含这个文件夹内所有文件的基本信息
如何用io流快速的实现输出

------解决方案--------------------
Java code
import java.io.*;
class  TestP
{
    public static void main(String[] args) 
    {
        File s = new File("e:/1");
        log(s);
        Play(s);
    }

    public static void Play(File f) {
        File[] child = f.listFiles();
        for(int i = 0;i < child.length;i++){
            if(child[i].isDirectory()){
                log(child[i]);
                Play(child[i]);
            }
        }
    }
    
    public static void log(File currentFile){
         String[] s = currentFile.list();
         for(int i = 0; i < s.length;i++){
             StringBuffer sb = new StringBuffer();
             File temp = new File("f:/",currentFile.getName()+".txt");
             FileWriter wri = null;
            try {
                wri = new FileWriter(temp);
            } catch (IOException e) {
                e.printStackTrace();
            }
            BufferedWriter bw = new BufferedWriter(wri);
            for(String a:s){
                    sb.append(a);
                    sb.append("\n");    
            }
            try {
                bw.write(sb.toString());
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                bw.flush();
                } catch (IOException e) {
                    e.printStackTrace();
                }
        }//close for
        
    }
}

------解决方案--------------------
数组方式可能更快,一行行读慢:
引用
InputStream in = new FileInputStream(new File("f:/test.txt"));
int bytesRead = 0;
// 用输入流进行先读,然后用输出流去写,用的是缓冲输入输出流
byte[] buffer = new byte[8192];
while ((bytesRead = in.read(buffer, 0, 8192)) != -1) {
try{
bos.write(buffer, 0, bytesRead);
}catch(Exception e){}
}
byte[] bt = bos.toByteArray();
System.out.println(new String(bt, "GBK"));
bos.close();
in.close();

------解决方案--------------------
探讨
数组方式可能更快,一行行读慢:

引用
InputStream in = new FileInputStream(new File("f:/test.txt"));
int bytesRead = 0;
// 用输入流进行先读,然后用输出流去写,用的是缓冲输入输出流
byte[] buffer = new byte[8192];
while ((bytesRead = in.read……

------解决方案--------------------
探讨
引用:
数组方式可能更快,一行行读慢:

引用
InputStream in = new FileInputStream(new File("f:/test.txt"));
int bytesRead = 0;
// 用输入流进行先读,然后用输出流去写,用的是缓冲输入输出流
byte[] buffer = new byte[8192];
while ……