code: public static int writeUtf8(ByteBuf buf, CharSequence seq) {
          return reserveAndWriteUtf8(buf, seq, utf8MaxBytes(seq));
      }
docs: Encode a {@link CharSequence} in <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> and write
  it to a {@link ByteBuf}.
  <p>
  It behaves like {@link #reserveAndWriteUtf8(ByteBuf, CharSequence, int)} with {@code reserveBytes}
  computed by {@link #utf8MaxBytes(CharSequence)}.<br>
  This method returns the actual number of bytes written.