String value = message.toString();
IoBuffer buf = IoBuffer.allocate(value.length())
.setAutoExpand(true);
buf.putString(value, encoder);
if (buf.position() > maxLineLength) {
throw new IllegalArgumentException("Line length: " + buf.position());
}
buf.putString(delimiter.getValue(), encoder);
buf.flip();
out.write(buf);
}