Thanks for quick fix, Willem. I will check it out. Actually your suggestion
to set body to inputstream works very well, here is part of the code in case
anybody wants to do the same:
exchange.getOut().setHeader( Exchange.HTTP_RESPONSE_CODE, 200 );
exchange.getOut().setHeader( Exchange.CONTENT_TYPE, mediaType );
ByteArrayInputStream bais = new ByteArrayInputStream(imageData);
exchange.getOut().setBody( bais );
Finally, I tried to use ByteArrayOutputStream at first place, it did not
work, I am still wondering why it's inputsteam not outputstream since I am
send data out from Camel point of view.
--
View this message in context:
http://camel.465427.n5.nabble.com/return-binary-image-data-in-camel-restlet-environment-tp5741062p5741238.html
Sent from the Camel - Users mailing list archive at Nabble.com.