Package net.sf.jasperreports.export
Class SimpleWriterExporterOutput
- java.lang.Object
-
- net.sf.jasperreports.export.SimpleWriterExporterOutput
-
- All Implemented Interfaces:
ExporterOutput
,WriterExporterOutput
- Direct Known Subclasses:
SimpleHtmlExporterOutput
,SimpleJsonExporterOutput
,SimpleXmlExporterOutput
public class SimpleWriterExporterOutput extends Object implements WriterExporterOutput
- 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 Description SimpleWriterExporterOutput(File file)
Creates aWriterExporterOutput
instance that puts the result into the provided java.io.File object.SimpleWriterExporterOutput(File file, String encoding)
SimpleWriterExporterOutput(OutputStream outputStream)
Creates aWriterExporterOutput
instance that puts the result into provided java.io.OutputStream object.SimpleWriterExporterOutput(OutputStream outputStream, String encoding)
SimpleWriterExporterOutput(Writer writer)
Creates aWriterExporterOutput
instance that puts the result into the provided java.io.Writer object.SimpleWriterExporterOutput(String fileName)
Creates aWriterExporterOutput
instance that puts the result into the file designated by the provided file name.SimpleWriterExporterOutput(StringBuffer sbuffer)
Creates aWriterExporterOutput
instance which stores its result into the provided string buffer.SimpleWriterExporterOutput(StringBuilder sbuilder)
Creates aWriterExporterOutput
instance which stores its result into the provided string builder.SimpleWriterExporterOutput(String fileName, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
getEncoding()
The character encoding used for export.Writer
getWriter()
-
-
-
Constructor Detail
-
SimpleWriterExporterOutput
public SimpleWriterExporterOutput(StringBuffer sbuffer)
Creates aWriterExporterOutput
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(StringBuilder sbuilder)
Creates aWriterExporterOutput
instance which stores its result into the provided string builder. Useful for just storing the result in a string for later use.
-
SimpleWriterExporterOutput
public SimpleWriterExporterOutput(Writer writer)
Creates aWriterExporterOutput
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(OutputStream outputStream)
Creates aWriterExporterOutput
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(OutputStream outputStream, String encoding)
-
SimpleWriterExporterOutput
public SimpleWriterExporterOutput(File file)
Creates aWriterExporterOutput
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(String fileName)
Creates aWriterExporterOutput
instance that puts the result into the file designated by the provided file name. This is an alternative to theSimpleWriterExporterOutput(File)
.
-
-
Method Detail
-
getEncoding
public String getEncoding()
The character encoding used for export.- Specified by:
getEncoding
in interfaceWriterExporterOutput
- See Also:
WriterExporterOutput.PROPERTY_CHARACTER_ENCODING
-
getWriter
public Writer getWriter()
- Specified by:
getWriter
in interfaceWriterExporterOutput
-
close
public void close()
- Specified by:
close
in interfaceWriterExporterOutput
-
-