I'm trying to read a zip file sent as byte[] from a RESTFul service. I was
able to read each ZipEntry without an issue using RestEasy Client API in a
test case. When I tried to the same with Camel it throws an EOFException.
Any clue?
public void process(Exchange exchange) throws Exception {
byte[] byteArray=null;
ZipEntry zipEntry = null;
byteArray=message.getBody(byte[].class);
byteArrayInputStream = new ByteArrayInputStream(byteArray);
ZipInputStream zipInputStream = new ZipInputStream(byteArrayInputStream);
*while (null != (zipEntry = zipInputStream.getNextEntry())) {* //fails here
System.out.println(" file ZipEntry getName " + zipEntry.getName());
able to read each ZipEntry without an issue using RestEasy Client API in a
test case. When I tried to the same with Camel it throws an EOFException.
Any clue?
public void process(Exchange exchange) throws Exception {
byte[] byteArray=null;
ZipEntry zipEntry = null;
byteArray=message.getBody(byte[].class);
byteArrayInputStream = new ByteArrayInputStream(byteArray);
ZipInputStream zipInputStream = new ZipInputStream(byteArrayInputStream);
*while (null != (zipEntry = zipInputStream.getNextEntry())) {* //fails here
System.out.println(" file ZipEntry getName " + zipEntry.getName());