Writing to the same file; not overwriting
问题 Here is my snippet. File file = new File(Thread.currentThread().getName()); for(each element of the list){ createStringWriterAndPopulateDataToBeWritten FileOutputStream fo = new FileOutputStream(file); OutputStreamWriter out = new OutputStreamWriter(fo,"UTF-8"); out.write(sw.toString()); out.close(); } Now say i have a newFixedThreadPool of size S ; i pass this thread pool a list of work to be done. Now everytime a thread is called, it creates a file with name as the name of thread and then