I want to download files which i wrote @POST method in rest web service using java.
I used with FileIOStream, but i find that i can download images and zip file types,but file is corrupted.
Do anyone know which library file i need to use in order to download all kinds of file types.
Thanks.
You need to set the @Produces (or @Consumes) annotation to specify what type of data is being sent or received.
@Consumes({“text/plain,text/html,application/zip”})
will allow a service to receive plain text, html and zip.
http://download.oracle.com/docs/cd/E19226-01/820-7627/gipxf/index.html