As long as multiple threads aren't accessing the StringBuilder
itself or causing it to be accessed in a concurrent manner, then you should be fine.
In your case, if the method the StringBuilder/Buffer
is in is synchronized
, only one thread should have access to it at any one time, so a StringBuilder
should suffice.