public class Export<E> extends Object
ExportModel and some datas.
Export.exportToFile(model, data, file);
Export.exportToWriter(model, data, writer);
String exportcontent = Export.exportToString(model, data);
Export<E> exporter = Export.newExport(model, data);
| Modifier and Type | Field and Description |
|---|---|
protected Iterable<E> |
data
Data to export.
|
protected ExportModel<E> |
model
Export model.
|
protected String |
separator
Cell separator.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Export(ExportModel<E> model,
Iterable<E> data) |
| Modifier and Type | Method and Description |
|---|---|
static <E> void |
exportToFile(ExportModel<E> model,
Iterable<E> data,
File file) |
static <E> void |
exportToFile(ExportModel<E> model,
Iterable<E> data,
File file,
Charset charset) |
static <E> void |
exportToFile(ExportModel<E> model,
Iterable<E> data,
File file,
Charset charset,
boolean writeHeader) |
static <E> void |
exportToOutputStream(ExportModel<E> model,
Iterable<E> data,
OutputStream outputStream) |
static <E> void |
exportToOutputStream(ExportModel<E> model,
Iterable<E> data,
OutputStream outputStream,
boolean writeHeader) |
static <E> void |
exportToOutputStream(ExportModel<E> model,
Iterable<E> data,
OutputStream outputStream,
boolean writeHeader,
Charset charset) |
static <E> void |
exportToOutputStream(ExportModel<E> model,
Iterable<E> data,
OutputStream outputStream,
Charset charset) |
static <E> String |
exportToString(ExportModel<E> model,
Iterable<E> data) |
static <E> String |
exportToString(ExportModel<E> model,
Iterable<E> data,
Charset charset) |
static <E> String |
exportToString(ExportModel<E> model,
Iterable<E> data,
Charset charset,
boolean writeHeader) |
static <E> void |
exportToWriter(ExportModel<E> model,
Iterable<E> data,
Writer writer) |
static <E> void |
exportToWriter(ExportModel<E> model,
Iterable<E> data,
Writer writer,
boolean writeHeader) |
static <E> Export<E> |
newExport(ExportModel<E> model,
Iterable<E> data) |
String |
toString(Charset charset) |
String |
toString(Charset charset,
boolean writeHeader) |
void |
write(File file) |
void |
write(File file,
boolean writeHeader) |
void |
write(File file,
Charset charset) |
void |
write(File file,
Charset charset,
boolean writeHeader) |
void |
write(OutputStream outputStream) |
void |
write(OutputStream outputStream,
boolean writeHeader) |
void |
write(OutputStream outputStream,
Charset charset) |
void |
write(OutputStream outputStream,
Charset charset,
boolean writeHeader) |
void |
write(Writer writer) |
void |
write(Writer writer,
boolean writeHeader) |
protected void |
writeHeader(Writer writer) |
protected void |
writeRow(Writer writer,
Iterable<ExportableColumn<E,Object>> columns,
E row) |
protected final ExportModel<E> model
protected final String separator
ExportModel.getSeparator()protected Export(ExportModel<E> model, Iterable<E> data)
public static <E> Export<E> newExport(ExportModel<E> model, Iterable<E> data)
public static <E> void exportToOutputStream(ExportModel<E> model, Iterable<E> data, OutputStream outputStream) throws Exception
Exceptionpublic static <E> void exportToOutputStream(ExportModel<E> model, Iterable<E> data, OutputStream outputStream, boolean writeHeader) throws Exception
Exceptionpublic static <E> void exportToOutputStream(ExportModel<E> model, Iterable<E> data, OutputStream outputStream, Charset charset) throws Exception
Exceptionpublic static <E> void exportToOutputStream(ExportModel<E> model, Iterable<E> data, OutputStream outputStream, boolean writeHeader, Charset charset) throws Exception
Exceptionpublic static <E> void exportToWriter(ExportModel<E> model, Iterable<E> data, Writer writer) throws Exception
Exceptionpublic static <E> void exportToWriter(ExportModel<E> model, Iterable<E> data, Writer writer, boolean writeHeader) throws Exception
Exceptionpublic static <E> void exportToFile(ExportModel<E> model, Iterable<E> data, File file) throws Exception
Exceptionpublic static <E> void exportToFile(ExportModel<E> model, Iterable<E> data, File file, Charset charset) throws Exception
Exceptionpublic static <E> void exportToFile(ExportModel<E> model, Iterable<E> data, File file, Charset charset, boolean writeHeader) throws Exception
Exceptionpublic static <E> String exportToString(ExportModel<E> model, Iterable<E> data) throws Exception
Exceptionpublic static <E> String exportToString(ExportModel<E> model, Iterable<E> data, Charset charset) throws Exception
Exceptionpublic static <E> String exportToString(ExportModel<E> model, Iterable<E> data, Charset charset, boolean writeHeader) throws Exception
Exceptionprotected void writeHeader(Writer writer) throws IOException
IOExceptionprotected void writeRow(Writer writer, Iterable<ExportableColumn<E,Object>> columns, E row) throws Exception
Exceptionpublic void write(OutputStream outputStream, Charset charset) throws Exception
Exceptionpublic void write(OutputStream outputStream, Charset charset, boolean writeHeader) throws Exception
Exceptionpublic void write(OutputStream outputStream) throws Exception
Exceptionpublic void write(OutputStream outputStream, boolean writeHeader) throws Exception
Exceptionpublic void write(File file, Charset charset, boolean writeHeader) throws Exception
ExceptionCopyright © 2013–2016 CodeLutin. All rights reserved.