Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Came 2.13.1 Reading ZipInputStream EOFException

$
0
0
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());

Viewing all articles
Browse latest Browse all 5648

Trending Articles