private static void printHubDetails (int indent, Device dev)
    {
	try {
	    Hub		h = new Hub (dev);
	    int		ports = h.getNumPorts ();
	    boolean	indicator = h.isIndicator ();

	    indentLine (indent,
		(h.isRootHub () ? "Root " : "")
		+ "Hub, "
		+ ports
		+ " ports"
		);
	    indentLine (indent,
		"overcurrent protection: "
		+ h.getOverCurrentMode ()
		);
	    indentLine (indent,
		"power switching: "
		+ h.getPowerSwitchingMode ()
		);
	    if (indicator)
		indentLine (indent, "has port indicator LEDs");
	    if (h.isCompound ())
		indentLine (indent, "part of a compound device");

	    // not showing POTPGT, or hub's own current draw

	    indent -= 4;
	    indentLine (indent, "");
	    for (int i = 1; i <= ports; i++) {
		Device child = dev.getChild (i);

		if (child == null)
		    continue;

		indentLine (indent, "<!-- Port "
			+ i
			+ (h.isRemovable (i) ? "" : " is built-in.")
			+ " -->");
		printDevice (indent, child);
	    }

	} catch (IOException e) {
	    e.printStackTrace (System.out);
	}
    }