I recently encountered an idiom I haven\'t seen before: string assembly by StringWriter and PrintWriter. I mean, I know how to use them, but I\'ve always used StringBuilder
in this link : http://nohack.eingenetzt.com/java/java-stringwriter-vs-stringbuilder the author shows that the StringWriter is even slightly faster than the StringBuilder.and also said : "So when bigger amounts of data come into play the StringWriter clearly shows its superiority in performance over the StringBuilder."