private static void writeHtml(OutputStream out, String name) throws IOException {
    InputStream header = Main.class.getResourceAsStream(HTML_TEMPLATES + name);
    byte[] buffer = new byte[4096];
    int numRead;
    while ((numRead = header.read(buffer)) != -1) {
      out.write(buffer, 0, numRead);
    }
  }
Utility to convert from the JMH JSON output to an HTML file.
benchmark-graphs/src/main/java/org/conscrypt/graphgen/Main.java