On Liberty, each DataHandler object can be written to an output stream only once.
Writing a DataHandler object to an OutputStream object more than once results in an empty file.
After you call the javax.activation.DataHandler.writeTo(OutputStream) method, you cannot pass the
DataHandler object to another method, return it, or store it for later use.
As a workaround, you can create a new DataHandler object and initialize the DataHandler object
with the content that was already retrieved from the existing DataHandler object using the writeTo method. For example: