code: public static void appendResponse(StringBuilder buffer, String response) {
          if (response != null && !response.isEmpty()) {
              if (buffer.length() > 0) {
                  buffer.append("\r\n");
              }
  
              buffer.append(response);
          }
      }
docs: Accumulate response values in string buffer.
  
  @param buffer StringBuilder to which to append response
  @param response Appended to buffer