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
AnIResourceStreamWriter
which 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 providedIDataExporter
to export data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
Gets 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 Detail
-
DataExportResourceStreamWriter
public DataExportResourceStreamWriter(IDataExporter dataExporter, DataTable<?,?> dataTable)
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 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()
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()
.
-
-