private void sendSaslMessage(ChannelHandlerContext ctx, byte[] payload,
      List<CipherOption> options) throws IOException {
      DataTransferEncryptorMessageProto.Builder builder =
        DataTransferEncryptorMessageProto.newBuilder();
      builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
      if (payload != null) {
        BuilderPayloadSetter.wrapAndSetPayload(builder, payload);
      }
      if (options != null) {
        builder.addAllCipherOption(PBHelperClient.convertCipherOptions(options));
      }
      DataTransferEncryptorMessageProto proto = builder.build();
      int size = proto.getSerializedSize();
      size += CodedOutputStream.computeUInt32SizeNoTag(size);
      ByteBuf buf = ctx.alloc().buffer(size);
      proto.writeDelimitedTo(new ByteBufOutputStream(buf));
      safeWrite(ctx, buf);
    }
Create a ByteString from byte array without copying (wrap), and then set it as the payload
for the builder.
@param builder builder for HDFS DataTransferEncryptorMessage.
@param payload byte array of payload.
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java