This is really bad. StringBuilder must not be used by multiple threads:
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html
Java already has classes to do what you have reinvented from scratch such as... http://docs.oracle.com/javase/6/docs/api/java/io/FileWriter.html
If you used this, you would have no need to create multiple threads for reading and writing since Java will internally deal with the buffering for you.
This is really bad. StringBuilder must not be used by multiple threads:
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html
Java already has classes to do what you have reinvented from scratch such as... http://docs.oracle.com/javase/6/docs/api/java/io/FileWriter.html
If you used this, you would have no need to create multiple threads for reading and writing since Java will internally deal with the buffering for you.