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.
精彩评论