What is the correct way to \"empty\" a StringWriter in Java so that I can reuse the StringWriter without having to create a new one? Neither StringWriter.flush
StringWriter
How about calling getBuffer().setLength(0)?
getBuffer().setLength(0)