@Override
public CommandSink createCommandSink(OutputStream out) throws IOException {
final BufferedWriter buffer = new BufferedWriter(new OutputStreamWriter(
out, "UTF-8"));
return new SimplePayloadSink(buffer) {
@Override
public void finish() throws SerializationException {
super.finish();
try {
buffer.flush();