View | Details | Raw Unified | Return to bug 52062
Collapse All | Expand All

(-)SXSSFSheet.java (-1 / +2 lines)
Lines 35-40 Link Here
35
 * Streaming version of XSSFSheet implementing the "BigGridDemo" strategy.
35
 * Streaming version of XSSFSheet implementing the "BigGridDemo" strategy.
36
 *
36
 *
37
 * @author Alex Geller, Four J's Development Tools
37
 * @author Alex Geller, Four J's Development Tools
38
 * @author Stefan Helfert
38
*/
39
*/
39
public class SXSSFSheet implements Sheet, Cloneable
40
public class SXSSFSheet implements Sheet, Cloneable
40
{
41
{
Lines 1284-1290 Link Here
1284
1285
1285
        public SheetDataWriter() throws IOException 
1286
        public SheetDataWriter() throws IOException 
1286
        {
1287
        {
1287
            _fd = File.createTempFile("poi-sxxsf-sheet", ".xml");
1288
            _fd = File.createTempFile("poi-sxssf-sheet", ".xml");
1288
            _fd.deleteOnExit();
1289
            _fd.deleteOnExit();
1289
            _out = new BufferedWriter(new FileWriter(_fd));
1290
            _out = new BufferedWriter(new FileWriter(_fd));
1290
        }
1291
        }
(-)SXSSFWorkbook.java (-2 / +4 lines)
Lines 47-52 Link Here
47
 * Streaming version of XSSFWorkbook implementing the "BigGridDemo" strategy.
47
 * Streaming version of XSSFWorkbook implementing the "BigGridDemo" strategy.
48
 *
48
 *
49
 * @author Alex Geller, Four J's Development Tools
49
 * @author Alex Geller, Four J's Development Tools
50
 * @author Stefan Helfert
50
*/
51
*/
51
public class SXSSFWorkbook implements Workbook
52
public class SXSSFWorkbook implements Workbook
52
{
53
{
Lines 208-214 Link Here
208
            }
209
            }
209
            is.close();
210
            is.close();
210
        }
211
        }
211
212
        zip.close(); //otherwise xlsx temp file cant be deleted
212
        zos.close();
213
        zos.close();
213
    }
214
    }
214
    private static void copyStream(InputStream in, OutputStream out) throws IOException {
215
    private static void copyStream(InputStream in, OutputStream out) throws IOException {
Lines 316-321 Link Here
316
        while(((c=inReader.read())!=-1))
317
        while(((c=inReader.read())!=-1))
317
            outWriter.write(c);
318
            outWriter.write(c);
318
        outWriter.flush();
319
        outWriter.flush();
320
        worksheetData.close();//Otherwise xml-temp file cant be deleted
319
    }
321
    }
320
322
321
    public XSSFWorkbook getXSSFWorkbook()
323
    public XSSFWorkbook getXSSFWorkbook()
Lines 649-655 Link Here
649
    	}
651
    	}
650
    	
652
    	
651
        //Save the template
653
        //Save the template
652
        File tmplFile = File.createTempFile("poi-sxxsf-template", ".xlsx");
654
        File tmplFile = File.createTempFile("poi-sxssf-template", ".xlsx");
653
        tmplFile.deleteOnExit();
655
        tmplFile.deleteOnExit();
654
        FileOutputStream os = new FileOutputStream(tmplFile);
656
        FileOutputStream os = new FileOutputStream(tmplFile);
655
        _wb.write(os);
657
        _wb.write(os);

Return to bug 52062