Jersey service download file octet stream






















Response ;. FormDataContentDisposition ;. FormDataParam ;. Consumes MediaType. ContentDisposition ;. FormDataBodyPart ;. FormDataMultiPart ;. NumberFormat ;. GET ;. PathParam ;. Produces ;. QueryParam ;. There are a lot of tutorials out there explaining how to send binary data i.

Two possible solutions are based on either returning a Response or StreamingObject containing the appropriate binary data stream. Additional checks have been ommitted for better readability. After streaming a large file to the output and returning the Response, how does one delete or clean-up the files?

Easy, just add a finally block after the catch Exception where you handle further file operations. The file is not readable or is a directory. Thanks for reading. Your email address will not be published. Roy Tutorials Technical… Theoretical… Practical….

Create a REST resource class as shown below package com. GET; import javax. Path; import javax. Produces; import javax. MediaType; import javax. The Overflow Blog. Introducing Content Health, a new way to keep the knowledge base up-to-date. Podcast what if you could invest in your favorite developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related Hot Network Questions.



0コメント

  • 1000 / 1000