}
String value = message.toString();
ByteBuffer buf = ByteBuffer.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();