I have a web-service that is returning a stream like this:
<xsd:element name="objects" type="xsd:base64Binary"
xmime:expectedContentTypes="application/octet-stream"/>
My implementation method works by creating a
temporary file and the returning like
return new DataHandler(new FileDataSource(tempFile));
My understanding is that this is asynchronous.
So how can I trigger a deletion of this file
when the streaming is done?
I am already calling tempFile.deleteOnExit() but it
could be months or years before the JVM actually exits,
and I want to delete it sooner.
Thanks,
Dan