OutputStreamBufferOutput messageBufferOutput = messageBufferOutputHolder.get();
if (messageBufferOutput == null) {
messageBufferOutput = new OutputStreamBufferOutput(out);
}
else {
messageBufferOutput.reset(out);
}
messageBufferOutputHolder.set(messageBufferOutput);
if (messagePacker == null) {
messagePacker = new MessagePacker(messageBufferOutput);