org.springframework.web.servlet.view.jasperreports

## Class JasperReportsCsvView

- java.lang.Object
- - org.springframework.context.support.ApplicationObjectSupport
  - - org.springframework.web.context.support.WebApplicationObjectSupport
    - - org.springframework.web.servlet.view.AbstractView
      - - org.springframework.web.servlet.view.AbstractUrlBasedView
        - - org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView
          - - org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsSingleFormatView
            - - org.springframework.web.servlet.view.jasperreports.JasperReportsCsvView

All Implemented Interfaces:
  Aware, BeanNameAware, InitializingBean, ApplicationContextAware, ServletContextAware, View

    public class JasperReportsCsvView
    extends AbstractJasperReportsSingleFormatView

Implementation of `AbstractJasperReportsSingleFormatView` that renders report results in CSV format.

Since:
  1.1.3
Author:
  Rob Harrop, Juergen Hoeller

### Field Summary

### Fields inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView

`CONTENT_DISPOSITION_INLINE, HEADER_CONTENT_DISPOSITION`

### Fields inherited from class org.springframework.web.servlet.view.AbstractView

`DEFAULT_CONTENT_TYPE`

### Fields inherited from class org.springframework.context.support.ApplicationObjectSupport

`logger`

### Fields inherited from interface org.springframework.web.servlet.View

`PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE`

### Constructor Summary

Constructors
Constructor and Description
`JasperReportsCsvView()`

### Method Summary

Methods
`protected net.sf.jasperreports.engine.JRExporter` `createExporter()` Create a JasperReports exporter for a specific output format, which will be used to render the report to the HTTP response.
`protected boolean` `useWriter()` Return whether to use a `java.io.Writer` to write text content to the HTTP response.

### Methods inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsSingleFormatView

`generatesDownloadContent, renderReport, renderReportUsingOutputStream, renderReportUsingWriter`

### Methods inherited from class org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView

`convertExporterParameters, convertParameterValue, convertReportData, convertToExporterParameter, createReport, exposeLocalizationContext, fillReport, getConvertedExporterParameters, getExporterParameter, getExporterParameters, getJdbcDataSource, getReport, getReportData, getReportDataTypes, initApplicationContext, isUrlRequired, loadReport, loadReport, onInit, postProcessReport, renderMergedOutputModel, setConvertedExporterParameters, setExporterParameters, setHeaders, setJdbcDataSource, setReportDataKey, setSubReportDataKeys, setSubReportUrls`

### Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView

`afterPropertiesSet, checkResource, getUrl, setUrl, toString`

### Methods inherited from class org.springframework.web.servlet.view.AbstractView

`addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse`

### Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport

`getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext`

### Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

`getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### JasperReportsCsvView

    public JasperReportsCsvView()

### Method Detail

#### createExporter

    protected net.sf.jasperreports.engine.JRExporter createExporter()

Description copied from class: `AbstractJasperReportsSingleFormatView`
Create a JasperReports exporter for a specific output format, which will be used to render the report to the HTTP response.

The `useWriter` method determines whether the output will be written as text or as binary content.

Specified by:
  `createExporter` in class `AbstractJasperReportsSingleFormatView`
See Also:
  `AbstractJasperReportsSingleFormatView.useWriter()`

#### useWriter

    protected boolean useWriter()

Description copied from class: `AbstractJasperReportsSingleFormatView`
Return whether to use a `java.io.Writer` to write text content to the HTTP response. Else, a `java.io.OutputStream` will be used, to write binary content to the response.

Specified by:
  `useWriter` in class `AbstractJasperReportsSingleFormatView`
See Also:
  `ServletResponse.getWriter()`, `ServletResponse.getOutputStream()`