nl.lxtreme.ols.util.export
Class HtmlFileExporterImpl

java.lang.Object
  extended by nl.lxtreme.ols.util.export.HtmlExporterImpl
      extended by nl.lxtreme.ols.util.export.HtmlFileExporterImpl
All Implemented Interfaces:
ExportUtils.HtmlExporter, ExportUtils.HtmlFileExporter

public class HtmlFileExporterImpl
extends HtmlExporterImpl
implements ExportUtils.HtmlFileExporter

Provides a file-writing HTML exporter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.lxtreme.ols.util.ExportUtils.HtmlExporter
ExportUtils.HtmlExporter.Attribute, ExportUtils.HtmlExporter.Element, ExportUtils.HtmlExporter.MacroResolver
 
Field Summary
 Writer writer
           
 
Fields inherited from interface nl.lxtreme.ols.util.ExportUtils.HtmlExporter
BR, DIV, H1, H2, H3, HR, META, P, SPAN, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR
 
Constructor Summary
  HtmlFileExporterImpl(File aFile)
          Creates a new HtmlFileExporterImpl instance for writing to the given file in UTF-8.
protected HtmlFileExporterImpl(Writer aWriter)
          Creates a new HtmlFileExporterImpl instance for writing to the given Writer.
 
Method Summary
 void close()
          Closes this exporter and writes everything down to file.
 void write(ExportUtils.HtmlExporter.MacroResolver aResolver)
          Writes the HTML export to file using the given macro resolver to resolve any macros.
 
Methods inherited from class nl.lxtreme.ols.util.export.HtmlExporterImpl
addCssStyle, getBody, getHead, setTitle, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.lxtreme.ols.util.ExportUtils.HtmlExporter
addCssStyle, getBody, getHead, setTitle, toString
 

Field Detail

writer

public final Writer writer
Constructor Detail

HtmlFileExporterImpl

public HtmlFileExporterImpl(File aFile)
                     throws IOException
Creates a new HtmlFileExporterImpl instance for writing to the given file in UTF-8.

Parameters:
aFile - the file to write to, cannot be null;
Throws:
IOException - in case of I/O problems.

HtmlFileExporterImpl

protected HtmlFileExporterImpl(Writer aWriter)
Creates a new HtmlFileExporterImpl instance for writing to the given Writer.

Parameters:
aWriter - the writer to write to, cannot be null;
Method Detail

close

public void close()
           throws IOException
Closes this exporter and writes everything down to file.

Specified by:
close in interface ExportUtils.HtmlFileExporter
Throws:
IOException - in case of I/O problems.

write

public void write(ExportUtils.HtmlExporter.MacroResolver aResolver)
           throws IOException
Description copied from interface: ExportUtils.HtmlFileExporter
Writes the HTML export to file using the given macro resolver to resolve any macros.

Specified by:
write in interface ExportUtils.HtmlFileExporter
Parameters:
aResolver - the macro resolver to use, cannot be null.
Throws:
IOException - in case of I/O problems.
See Also:
ExportUtils.HtmlFileExporter.write(nl.lxtreme.ols.util.ExportUtils.HtmlExporter.MacroResolver)


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.