'How to change the Apache POI SXSSFWorkbook default temporary file name

I am using POI's SXSSFWorkbench class to create extremely large workbooks. Multiple processes may be running of my application concurrently, so I thought it prudent to append the processId to the default temporary filename. I don't know how to do that, and could not find any recent coding examples.

Can anyone point me to an example, or outline to me what has to be done? I see there is a static TempFile.createTempFile method. Should I be executing that using a class override before instantiating the SXSSFWorkbook class? Or after?

I also saw there was a DefaultTempFileCreationStrategy class. Could not find examples of how to use this either.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source