docs: public static <T> int writeTo(OutputStream out, T message, Schema<T> schema,
              LinkedBuffer buffer) throws IOException
      {
          if (buffer.start != buffer.offset)
              throw new IllegalArgumentException("Buffer previously used and had not been reset.");
  
          final YamlOutput output = new YamlOutput(buffer, out, schema);
  
          output.tail = YamlOutput.writeTag(
                  schema.messageName(),
                  false,
                  output.sink,
                  output,
                  output.sink.writeByteArray(
                          START_DIRECTIVE,
                          output,
                          buffer));
  
          schema.writeTo(output, message);
  
          LinkedBuffer.writeTo(out, buffer);
  
          return output.getSize();
      }