org.apache.wicket.extensions.markup.html.repeater.data.table.export
Class ExportToolbar.DataExportResourceStreamWriter

java.lang.Object
  extended by org.apache.wicket.util.resource.AbstractResourceStreamWriter
      extended by org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.DataExportResourceStreamWriter
All Implemented Interfaces:
Closeable, Serializable, 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:
Serialized Form

Constructor Summary
ExportToolbar.DataExportResourceStreamWriter(IDataExporter dataExporter, DataTable<?,?> dataTable)
          Creates a new instance using the provided IDataExporter to export data.
 
Method Summary
 String getContentType()
          
 void 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportToolbar.DataExportResourceStreamWriter

public ExportToolbar.DataExportResourceStreamWriter(IDataExporter dataExporter,
                                                    DataTable<?,?> dataTable)
Creates a new instance using the provided IDataExporter to export data.

Parameters:
dataExporter - The IDataExporter to use to export data.
Method Detail

write

public void write(OutputStream output)
           throws IOException
Writes the exported data to the output stream. This implementation calls exportData(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:
getContentType in interface org.apache.wicket.util.resource.IResourceStream
Overrides:
getContentType in class org.apache.wicket.util.resource.AbstractResourceStreamWriter
Returns:
the content type returned by IDataExporter.getContentType().


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.