Actually, you can just use `Unpooled.copiedBuffer(String, Charset)`.