Export to HTML as given by the parameters.
Implementers should write an "index.html" file plus any
required supporting files in the directory given in the parameters.
The caller is responsible for checking with the user whether
any contents of the specified directory can be overwritten.
parameters - The parameters for the export.
writer - The writer to use the write the HTML. If this is null,
then the implementer should create an index.html file in the
directory given by the directoryToExportTo field of the parameters.
java.io.IOException - If unable to write any files.
java.awt.print.PrinterException - If unable to write associated files.