org.nuiton.util.csv
Class Export<E>
java.lang.Object
org.nuiton.util.csv.Export<E>
public class Export<E>
- extends Object
Object to realize a export from a ExportModel and some datas.
Usefull static methods
There is some usefull methods here to do operation in one line :
To export to a file
Export.exportToFile(model, data, file);
To export to a writer
Export.exportToWriter(model, data, writer);
To export as a string
String exportcontent = Export.exportToString(model, data);
To obtain a new instance of an exporter
Export<E> exporter = Export.newExport(model, data);
- Since:
- 2.4
- Author:
- bleny , tchemit
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
protected ExportModel<E> model
data
protected Iterable<E> data
Export
protected Export(ExportModel<E> model,
Iterable<E> data)
newExport
public static <E> Export<E> newExport(ExportModel<E> model,
Iterable<E> data)
exportToFile
public static <E> void exportToFile(ExportModel<E> model,
Iterable<E> data,
File file)
throws Exception
- Throws:
Exception
exportToString
public static <E> String exportToString(ExportModel<E> model,
Iterable<E> data)
throws Exception
- Throws:
Exception
exportToWriter
public static <E> void exportToWriter(ExportModel<E> model,
Iterable<E> data,
Writer writer)
throws Exception
- Throws:
Exception
exportToFile
public void exportToFile(File file)
throws Exception
- Throws:
Exception
startExport
public void startExport(Writer writer)
throws Exception
- Throws:
Exception
startExportAsString
public String startExportAsString()
throws Exception
- Throws:
Exception
startExport
public InputStream startExport()
throws Exception
- Throws:
Exception
Copyright © 2011 CodeLutin. All Rights Reserved.