public class SheetDataWriter
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
protected java.io.Writer |
_out |
Constructor and Description |
---|
SheetDataWriter() |
SheetDataWriter(SharedStringsTable sharedStringsTable) |
SheetDataWriter(java.io.Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
flush and close the temp data writer.
|
java.io.File |
createTempFile()
Deprecated.
use
TempFile.createTempFile(String, String) directly |
java.io.Writer |
createWriter(java.io.File fd)
Deprecated.
this method is due to be made non-public, probably protected
|
protected java.io.InputStream |
decorateInputStream(java.io.FileInputStream fis)
Override this to translate (such as decrypt or expand) the file input stream
as it is being read from disk.
|
protected java.io.OutputStream |
decorateOutputStream(java.io.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 java.io.File |
getTempFile() |
java.io.InputStream |
getWorksheetXMLInputStream() |
protected void |
outputEscapedString(java.lang.String s) |
void |
writeCell(int columnIndex,
Cell cell) |
void |
writeRow(int rownum,
SXSSFRow row)
Write a row to the file
|
public SheetDataWriter() throws java.io.IOException
java.io.IOException
public SheetDataWriter(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public SheetDataWriter(SharedStringsTable sharedStringsTable) throws java.io.IOException
java.io.IOException
@Removal(version="6.0.0") public java.io.File createTempFile() throws java.io.IOException
TempFile.createTempFile(String, String)
directly.gz
java.io.IOException
@Removal(version="6.0.0") public java.io.Writer createWriter(java.io.File fd) throws java.io.IOException
fd
- the file to write tojava.io.IOException
protected java.io.OutputStream decorateOutputStream(java.io.FileOutputStream fos) throws java.io.IOException
fos
- the stream to decoratejava.io.IOException
- if decorating the stream failsdecorateInputStream(FileInputStream)
public void close() throws java.io.IOException
getWorksheetXMLInputStream()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
protected java.io.File getTempFile()
public java.io.InputStream getWorksheetXMLInputStream() throws java.io.IOException
java.io.IOException
protected java.io.InputStream decorateInputStream(java.io.FileInputStream fis) throws java.io.IOException
fis
- the stream to decoratejava.io.IOException
- 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 java.io.IOException
rownum
- 0-based row numberrow
- a rowjava.io.IOException
- If an I/O error occurspublic void writeCell(int columnIndex, Cell cell) throws java.io.IOException
java.io.IOException
protected void outputEscapedString(java.lang.String s) throws java.io.IOException
java.io.IOException
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.