Module org.apache.wicket.extensions
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
An
IResourceStreamWriter which writes the exportable data from a table to an output stream.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDataExportResourceStreamWriter(IDataExporter dataExporter, DataTable<?, ?> dataTable) Creates a new instance using the providedIDataExporterto export data. -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(OutputStream output) Writes the exported data to the output stream.Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStreamWriter
close, getInputStream, getLocale, getStyle, getVariation, lastModifiedTime, length, setLocale, setStyle, setVariation
-
Constructor Details
-
DataExportResourceStreamWriter
Creates a new instance using the providedIDataExporterto export data.- Parameters:
dataExporter- TheIDataExporterto use to export data.dataTable- TheDataTablefrom which to export.
-
-
Method Details
-
write
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
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().
-