camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <premiergenerat...@yahoo.com>
Subject TypeConverter GenericFile to InputStream
Date Fri, 02 Dec 2011 16:25:40 GMT
Hello All,
It looks like in Camel 2.6.0 there is no TypeConverter from GenericFile to
InputStream.  It is easy enough to get an InputStream from a GenericFile:

Object body = exchange.getIn().getBody();
InputStream inputStream = null;
if (body instanceof GenericFile) {
GenericFile<File> file = (GenericFile<File>) body;
inputStream = new FileInputStream(file.getFile());
} 

Is this a TypeConverter that can be added or is it available in later
release of Camel?

Thanks,
Yogesh

--
View this message in context: http://camel.465427.n5.nabble.com/TypeConverter-GenericFile-to-InputStream-tp5042415p5042415.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message