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
,IClusterable
,IResourceStream
,IResourceStreamWriter
,IModifiable
- Enclosing class:
- ExportToolbar
public static class ExportToolbar.DataExportResourceStreamWriter
extends AbstractResourceStreamWriter
An
IResourceStreamWriter
which writes the exportable data from a table to an output stream.- See Also:
-
Constructor Summary
ConstructorDescriptionDataExportResourceStreamWriter
(IDataExporter dataExporter, DataTable<?, ?> dataTable) Creates a new instance using the providedIDataExporter
to export data. -
Method Summary
Modifier and TypeMethodDescriptionGets the mime type of this resourcevoid
write
(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 providedIDataExporter
to export data.- Parameters:
dataExporter
- TheIDataExporter
to use to export data.dataTable
- TheDataTable
from 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
Gets the mime type of this resourceThis method returns the content type returned by
IDataExporter.getContentType()
.- Specified by:
getContentType
in interfaceIResourceStream
- Overrides:
getContentType
in classAbstractResourceStreamWriter
- Returns:
- the content type returned by
IDataExporter.getContentType()
.
-