Which is the best way to keep a stringbuffer length constant in Java? That is, if the fixed value is 10 and the stringbuffer contains ABCDEFGHIJ, appending K will clear A, resulting in BCDEFGHIJK. I'm considering combining StringBuffer's reverse() and setLength() methods, but I'm not sure how well it will work at 100 K length.