code: private void writeResponse(final HttpServletResponse response, final String data) throws IOException {
      final byte[] outputBody = data.getBytes(StandardCharsets.UTF_8);
      response.getOutputStream().write(outputBody);
    }
docs: Write a String to HTTP Response.