nl.lxtreme.ols.util
Class ExportUtils

java.lang.Object
  extended by nl.lxtreme.ols.util.ExportUtils

public final class ExportUtils
extends Object

Provides several export utilities, like exporters for CSV and/or HTML.


Nested Class Summary
static interface ExportUtils.CsvExporter
          Provides a simple CSV data exporter, which is basically a set of (optional) headers at the first line followed by a number of comma-separated values.
static interface ExportUtils.HtmlExporter
          Provides a simple HTML exporter, which is kind of a tree-structure of HTML-elements (containing attributes).
static interface ExportUtils.HtmlFileExporter
           
 
Method Summary
static ExportUtils.CsvExporter createCsvExporter(File aFile)
          Creates a CSV exporter for the given file.
static ExportUtils.HtmlExporter createHtmlExporter()
          Creates a HTML exporter.
static ExportUtils.HtmlFileExporter createHtmlExporter(File aFile)
          Creates a HTML exporter for the given file, which is written in UTF-8.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCsvExporter

public static ExportUtils.CsvExporter createCsvExporter(File aFile)
                                                 throws IOException
Creates a CSV exporter for the given file.

Parameters:
aFile - the file to export to, cannot be null.
Returns:
a CSV exporter, never null.
Throws:
IOException - in case of I/O errors.

createHtmlExporter

public static ExportUtils.HtmlExporter createHtmlExporter()
Creates a HTML exporter.

Returns:
a HTML exporter, never null.

createHtmlExporter

public static ExportUtils.HtmlFileExporter createHtmlExporter(File aFile)
                                                       throws IOException
Creates a HTML exporter for the given file, which is written in UTF-8.

Parameters:
aFile - the file to export to, cannot be null.
Returns:
a HTML exporter, never null.
Throws:
IOException - in case of I/O errors.


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