Class ExportToolbar.DataExportResourceStreamWriter
- java.lang.Object
-
- org.apache.wicket.util.resource.AbstractResourceStreamWriter
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.DataExportResourceStreamWriter
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,org.apache.wicket.util.io.IClusterable,org.apache.wicket.util.resource.IResourceStream,org.apache.wicket.util.resource.IResourceStreamWriter,org.apache.wicket.util.watch.IModifiable
- Enclosing class:
- ExportToolbar
public static class ExportToolbar.DataExportResourceStreamWriter extends org.apache.wicket.util.resource.AbstractResourceStreamWriter
AnIResourceStreamWriterwhich writes the exportable data from a table to an output stream.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataExportResourceStreamWriter(IDataExporter dataExporter, DataTable<?,?> dataTable)Creates a new instance using the providedIDataExporterto export data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()voidwrite(OutputStream output)Writes the exported data to the output stream.
-
-
-
Constructor Detail
-
DataExportResourceStreamWriter
public DataExportResourceStreamWriter(IDataExporter dataExporter, DataTable<?,?> dataTable)
Creates a new instance using the providedIDataExporterto export data.- Parameters:
dataExporter- TheIDataExporterto use to export data.dataTable- TheDataTablefrom which to export.
-
-
Method Detail
-
write
public void write(OutputStream output) throws IOException
Writes the exported data to the output stream. This implementation callsexportData(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable, org.apache.wicket.extensions.markup.html.repeater.data.table.export.IDataExporter, java.io.OutputStream).- Parameters:
output- The output stream to which to export the data.- Throws:
IOException- if an error occurs.
-
getContentType
public String getContentType()
This method returns the content type returned by
IDataExporter.getContentType().- Specified by:
getContentTypein interfaceorg.apache.wicket.util.resource.IResourceStream- Overrides:
getContentTypein classorg.apache.wicket.util.resource.AbstractResourceStreamWriter- Returns:
- the content type returned by
IDataExporter.getContentType().
-
-