Package org.apache.poi.xssf.streaming
Class GZIPSheetDataWriter
- java.lang.Object
-
- org.apache.poi.xssf.streaming.SheetDataWriter
-
- org.apache.poi.xssf.streaming.GZIPSheetDataWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class GZIPSheetDataWriter extends SheetDataWriter
Sheet writer that supports gzip compression of the temp files.
-
-
Field Summary
-
Fields inherited from class org.apache.poi.xssf.streaming.SheetDataWriter
_out
-
-
Constructor Summary
Constructors Constructor Description GZIPSheetDataWriter()GZIPSheetDataWriter(SharedStringsTable sharedStringsTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FilecreateTempFile()Deprecated.no need for this be public, will be made private or protected in an upcoming releaseprotected InputStreamdecorateInputStream(FileInputStream fis)Override this to translate (such as decrypt or expand) the file input stream as it is being read from disk.protected OutputStreamdecorateOutputStream(FileOutputStream fos)Override this to translate (such as encrypt or compress) the file output stream as it is being written to disk.-
Methods inherited from class org.apache.poi.xssf.streaming.SheetDataWriter
close, createWriter, getLastFlushedRow, getLowestIndexOfFlushedRows, getNumberOfCellsOfLastFlushedRow, getNumberOfFlushedRows, getTempFile, getWorksheetXMLInputStream, outputEscapedString, writeCell, writeRow
-
-
-
-
Constructor Detail
-
GZIPSheetDataWriter
public GZIPSheetDataWriter() throws IOException- Throws:
IOException
-
GZIPSheetDataWriter
public GZIPSheetDataWriter(SharedStringsTable sharedStringsTable) throws IOException
- Parameters:
sharedStringsTable- the shared strings table, or null if inline text is used- Throws:
IOException
-
-
Method Detail
-
createTempFile
@Deprecated @Removal(version="6.0.0") public File createTempFile() throws IOException
Deprecated.no need for this be public, will be made private or protected in an upcoming releaseDescription copied from class:SheetDataWriterCreate a temp file to write sheet data. By default, temp files are created in the default temporary-file directory with a prefix "poi-sxssf-sheet" and suffix ".xml". Subclasses can override it and specify a different temp directory or filename or suffix, e.g..gz- Overrides:
createTempFilein classSheetDataWriter- Returns:
- temp file to write sheet data
- Throws:
IOException
-
decorateInputStream
protected InputStream decorateInputStream(FileInputStream fis) throws IOException
Description copied from class:SheetDataWriterOverride this to translate (such as decrypt or expand) the file input stream as it is being read from disk. The default behavior is to to pass the stream through unmodified.- Overrides:
decorateInputStreamin classSheetDataWriter- Parameters:
fis- the stream to decorate- Returns:
- a decorated stream
- Throws:
IOException- if decorating the stream fails- See Also:
SheetDataWriter.decorateOutputStream(FileOutputStream)
-
decorateOutputStream
protected OutputStream decorateOutputStream(FileOutputStream fos) throws IOException
Description copied from class:SheetDataWriterOverride this to translate (such as encrypt or compress) the file output stream as it is being written to disk. The default behavior is to to pass the stream through unmodified.- Overrides:
decorateOutputStreamin classSheetDataWriter- Parameters:
fos- the stream to decorate- Returns:
- a decorated stream
- Throws:
IOException- if decorating the stream fails- See Also:
SheetDataWriter.decorateInputStream(FileInputStream)
-
-