Hi Surjendu,
my first quick answer is that you don't need to wrap your
FileRepresentation with an EncodeRepresentation. there is no gain to zip
a zip file.
File file = new File("c:\\temp.zip");
rep = new FileRepresentation(file,MediaType.APPLICATION_ZIP);
getResponse().setEntity(rep);
However, this may be the sign of a bug, I have a look at this.
best regards,
Thierry Boileau
I am receiving the following exception when the entity is
being set in the response.
java.util.zip.ZipException: no current ZIP entry
My code:
File file = new File("c:\\temp.zip");
rep = new FileRepresentation(file,MediaType.APPLICATION_ZIP);
Representation zippedRep = new EncodeRepresentation(Encoding.ZIP,rep);
getResponse().setEntity(zippedRep);