public class CsvExportWriter extends java.lang.Object implements IExportWriter
| Constructor and Description |
|---|
CsvExportWriter(javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginDocument(java.lang.String name,
java.io.OutputStream out)
Initializes CSV document stringbuffer
|
void |
beginRow()
Represents a new row when writing entries to a csv file.
|
void |
emitCell(int cellPos,
java.lang.Object val,
int maxType,
ICellStyle style,
IExportContext context)
Formats values accordingly based on the type of object and encodes double quotes and wraps strings
containing commas with quotes and then writes encoded string to the buffer.
|
void |
emitComma()
Writes a single comma string value to the buffer.
|
void |
endDocument()
Writes the buffer to the response.
|
void |
endRow()
Writes a new line to the buffer
|
public CsvExportWriter(javax.servlet.http.HttpServletResponse response)
public void beginDocument(java.lang.String name,
java.io.OutputStream out)
beginDocument in interface IExportWritername - - the name of the sheet created in the excel fileout - - output streampublic void endDocument()
endDocument in interface IExportWriterpublic void beginRow()
beginRow in interface IExportWriterpublic void endRow()
endRow in interface IExportWriterpublic void emitComma()
emitComma in interface IExportWriterpublic void emitCell(int cellPos,
java.lang.Object val,
int maxType,
ICellStyle style,
IExportContext context)
emitCell in interface IExportWriterval - - Object that gets encoded and written to buffer.maxtype - - String type of data object