net.sf.jasperreports.export

## Class SimpleWriterExporterOutput

- java.lang.Object
- - net.sf.jasperreports.export.SimpleWriterExporterOutput

- All Implemented Interfaces:
    ExporterOutput, WriterExporterOutput
  Direct Known Subclasses:
    SimpleHtmlExporterOutput, SimpleXmlExporterOutput

      public class SimpleWriterExporterOutput
      extends java.lang.Object
      implements WriterExporterOutput

  Version:
    $Id: SimpleWriterExporterOutput.java 6700 2013-11-08 10:22:28Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    - ### Fields inherited from interface net.sf.jasperreports.export.WriterExporterOutput

      `PROPERTY_CHARACTER_ENCODING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleWriterExporterOutput(java.io.File file)` Creates a `WriterExporterOutput` instance that puts the result into the provided `java.io.File` object.
    `SimpleWriterExporterOutput(java.io.File file, java.lang.String encoding)`
    `SimpleWriterExporterOutput(java.io.OutputStream outputStream)` Creates a `WriterExporterOutput` instance that puts the result into provided `java.io.OutputStream` object.
    `SimpleWriterExporterOutput(java.io.OutputStream outputStream, java.lang.String encoding)`
    `SimpleWriterExporterOutput(java.lang.String fileName)` Creates a `WriterExporterOutput` instance that puts the result into the file designated by the provided file name.
    `SimpleWriterExporterOutput(java.lang.StringBuffer sbuffer)` Creates a `WriterExporterOutput` instance which stores its result into the provided string buffer.
    `SimpleWriterExporterOutput(java.lang.String fileName, java.lang.String encoding)`
    `SimpleWriterExporterOutput(java.io.Writer writer)` Creates a `WriterExporterOutput` instance that puts the result into the provided `java.io.Writer` object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.lang.String` | `getEncoding()` The character encoding used for export.
    `java.io.Writer` | `getWriter()`

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

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

- - ### Constructor Detail

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.lang.StringBuffer sbuffer)

      Creates a `WriterExporterOutput` instance which stores its result into the provided string buffer. Useful for just storing the result in a string for later use.

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.io.Writer writer)

      Creates a `WriterExporterOutput` instance that puts the result into the provided `java.io.Writer` object. This is useful for sending the export result to a character stream, such as the `PrintWriter` of a servlet.

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.io.OutputStream outputStream)

      Creates a `WriterExporterOutput` instance that puts the result into provided `java.io.OutputStream` object. This is useful for sending the export result to an output stream, such as a `ServletOutputStream`.

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.io.OutputStream outputStream,
                                    java.lang.String encoding)

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.io.File file)

      Creates a `WriterExporterOutput` instance that puts the result into the provided `java.io.File` object. This is useful when exporting to a file and the `File` instance is already there.

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.io.File file,
                                    java.lang.String encoding)

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.lang.String fileName)

      Creates a `WriterExporterOutput` instance that puts the result into the file designated by the provided file name. This is an alternative to the `SimpleWriterExporterOutput(File)`.

    - #### SimpleWriterExporterOutput

          public SimpleWriterExporterOutput(java.lang.String fileName,
                                    java.lang.String encoding)

  - ### Method Detail

    - #### getEncoding

          public java.lang.String getEncoding()

      The character encoding used for export.
      Specified by:
        `getEncoding` in interface `WriterExporterOutput`
      See Also:
        `WriterExporterOutput.PROPERTY_CHARACTER_ENCODING`

    - #### getWriter

          public java.io.Writer getWriter()

      Specified by:
        `getWriter` in interface `WriterExporterOutput`

    - #### close

          public void close()

      Specified by:
        `close` in interface `WriterExporterOutput`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com