开发者

How to upload, download files in server side web serivce

How do I upload files in a REST web service? The Java Swing application will call REST web service to use the upload method.

I used apache.commons.fileupload but it is for web-based applications.

How do I download files? I used FileReader开发者_运维百科 and PrintWriter. it is ok for other files, but I have a problem with pictures and zip files. What lib do I need to use to download binary files, pictures, zip, HTML, etc.?


https://stackoverflow.com/a/32253028/15789

For anyone who stumbles upon this page - the above may help. It is an example REST service that receives bytes of a file and sends zipped bytes in response. Using JAX-RS Client to send request and receive response.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜