public class SheetDataWriter extends Object implements Closeable
Constructor and Description |
---|
SheetDataWriter() |
SheetDataWriter(SharedStringsTable sharedStringsTable) |
SheetDataWriter(Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
flush and close the temp data writer.
|
File |
createTempFile()
Deprecated.
use
TempFile.createTempFile(String, String) directly |
Writer |
createWriter(File fd)
Deprecated.
this method is due to be made non-public, probably protected
|
protected InputStream |
decorateInputStream(FileInputStream fis)
Override this to translate (such as decrypt or expand) the file input stream
as it is being read from disk.
|
protected OutputStream |
decorateOutputStream(FileOutputStream fos)
Override this to translate (such as encrypt or compress) the file output stream
as it is being written to disk.
|
int |
getLastFlushedRow() |
int |
getLowestIndexOfFlushedRows() |
int |
getNumberOfCellsOfLastFlushedRow() |
int |
getNumberOfFlushedRows() |
protected File |
getTempFile() |
InputStream |
getWorksheetXMLInputStream() |
protected void |
outputEscapedString(String s) |
void |
writeCell(int columnIndex,
Cell cell) |
void |
writeRow(int rownum,
SXSSFRow row)
Write a row to the file
|
protected final Writer _out
public SheetDataWriter() throws IOException
IOException
public SheetDataWriter(Writer writer) throws IOException
IOException
public SheetDataWriter(SharedStringsTable sharedStringsTable) throws IOException
IOException
@Removal(version="6.0.0") public File createTempFile() throws IOException
TempFile.createTempFile(String, String)
directly.gz
IOException
@Removal(version="6.0.0") public Writer createWriter(File fd) throws IOException
fd
- the file to write toIOException
protected OutputStream decorateOutputStream(FileOutputStream fos) throws IOException
fos
- the stream to decorateIOException
- if decorating the stream failsdecorateInputStream(FileInputStream)
public void close() throws IOException
getWorksheetXMLInputStream()
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected File getTempFile()
public InputStream getWorksheetXMLInputStream() throws IOException
IOException
protected InputStream decorateInputStream(FileInputStream fis) throws IOException
fis
- the stream to decorateIOException
- if decorating the stream failsdecorateOutputStream(FileOutputStream)
public int getNumberOfFlushedRows()
public int getNumberOfCellsOfLastFlushedRow()
public int getLowestIndexOfFlushedRows()
public int getLastFlushedRow()
public void writeRow(int rownum, SXSSFRow row) throws IOException
rownum
- 0-based row numberrow
- a rowIOException
- If an I/O error occurspublic void writeCell(int columnIndex, Cell cell) throws IOException
IOException
protected void outputEscapedString(String s) throws IOException
IOException