public class SheetDataWriter extends Object implements Closeable
| Constructor and Description |
|---|
SheetDataWriter() |
SheetDataWriter(SharedStringsTable sharedStringsTable) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
flush and close the temp data writer.
|
File |
createTempFile()
Create a temp file to write sheet data.
|
Writer |
createWriter(File fd)
Create a writer for the sheet data.
|
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.
|
protected void |
finalize() |
int |
getLastFlushedRow() |
int |
getLowestIndexOfFlushedRows() |
int |
getNumberOfCellsOfLastFlushedRow() |
int |
getNumberOfFlushedRows() |
protected File |
getTempFile() |
InputStream |
getWorksheetXMLInputStream() |
protected void |
outputQuotedString(String s) |
void |
writeCell(int columnIndex,
Cell cell) |
void |
writeRow(int rownum,
SXSSFRow row)
Write a row to the file
|
public SheetDataWriter()
throws IOException
IOExceptionpublic SheetDataWriter(SharedStringsTable sharedStringsTable) throws IOException
IOExceptionpublic File createTempFile() throws IOException
.gzIOExceptionpublic Writer createWriter(File fd) throws IOException
fd - the file to write toIOExceptionprotected OutputStream decorateOutputStream(FileOutputStream fos) throws IOException
fos - the stream to decorateIOExceptiondecorateInputStream(FileInputStream)public void close()
throws IOException
getWorksheetXMLInputStream()close in interface Closeableclose in interface AutoCloseableIOExceptionprotected File getTempFile()
public InputStream getWorksheetXMLInputStream() throws IOException
IOExceptionprotected InputStream decorateInputStream(FileInputStream fis) throws IOException
fis - the stream to decorateIOExceptiondecorateOutputStream(FileOutputStream)public int getNumberOfFlushedRows()
public int getNumberOfCellsOfLastFlushedRow()
public int getLowestIndexOfFlushedRows()
public int getLastFlushedRow()
protected void finalize()
throws Throwable
public void writeRow(int rownum,
SXSSFRow row)
throws IOException
rownum - 0-based row numberrow - a rowIOExceptionpublic void writeCell(int columnIndex,
Cell cell)
throws IOException
IOExceptionprotected void outputQuotedString(String s) throws IOException
IOExceptionCopyright 2018 The Apache Software Foundation or its licensors, as applicable.