poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57200] SXSSF saving fails sometimes as TempFile creation fails
Date Sat, 10 Sep 2016 06:14:30 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57200

--- Comment #11 from Javen O'Neal <onealj@apache.org> ---
There are a couple suggested strategies in the TempFileCreationStrategy
javadocs
https://poi.apache.org/apidocs/org/apache/poi/util/TempFileCreationStrategy.html

Feel free to subclass TempFileCreationStrategy to something that implements the
desired behavior -- store poifiles unsegregated from other system temporary
files which are cleaned up by a cron job (I like that solution for a
long-running server use case), or have Java do the cleanup either with a timer,
a fixed-length container, or something else.

Then it's as simple as
TempFile.setTempFileCreationStrategy(YourTempFileCreationStrategy).

If you need a more flexible solution, you need not restrict yourself to
TempFile.

We use TempFile and DefaultTempFileCreationStrategy for our unit tests, which
is the main purpose for them existing--we never bothered to mark them as
@Internal or package-private, but it is unlikely that we would internalize them
at this point.

I do not see a huge benefit implementing classes that are not specific to
handling Microsoft Office files in POI. I would rather see temporary file
creation and deletion moved to a general purpose I/O library so that these
classes could appeal to a wider audience. Any ideas if such a library exists
beyond java.io and java.nio?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message