private void writeJavaHelpTOC() throws IOException {
		System.out.println("  Writing JavaHelp TOC file " + outFilename);
		PrintWriter out = new PrintWriter(new FileOutputStream(outFilename));
		BufferedReader reader = new BufferedReader(new FileReader(sourceFilename));

		String line = null;
		while ((line = reader.readLine()) != null) {
			if (line.indexOf(TOCITEM) > 0) {
				TOCItem item = parseLine(line);
				if (item == null) {
					continue;
				}
				String endline = " >";
				if (line.endsWith("/>")) {
					endline = " />";
				}
				line = getPadString(line) + TOCITEM + " " + TEXT + "=\"" + item.getText() + "\"";

				if (item.getTarget().length() > 0) {
					line = line + TARGET + "=\"" + item.getTarget() + "\"";
				}
				line = line + endline;
			}
			else if (line.indexOf(TOC_VERSION) == 0) {
				out.println("<!-- This is the JavaHelp Table of Contents file -->");
				out.println("<!-- Auto generated on " + new Date() + ": Do not edit! -->");
			}
			if (!line.startsWith("<!-- Source")) {
				out.println(line);
			}
		}

		out.close();
		reader.close();
	}
Write the JavaHelp table of contents file.

@throws IOException
Ghidra/Framework/Help/src/main/java/help/TOCConverter.java