Thanks for the answers.
To increase the "context.getProperties().put(CachedOutputStream.THRESHOLD, "1024");" solved my problem. Disable the cache didn't work (and should already be disable by default in 2.2.0 anyway I think) Maybe the kind of route I'm using is enabling the cache (I'm using a splitter for instance) Thanks again for your answers! Regards Lars willem.jiang wrote: > > Yes, the StreamCache will use file to store the input steam when its > size large then 64K. > The IllegalArgumentException maybe relates to CAMEL-2636[1], we should > fix it in Camel 2.3.0. > > [1]https://issues.apache.org/activemq/browse/CAMEL-2636 > > Willem > Stan Lewis wrote: >> Think it's probably using stream caching for the larger files, you >> can increase the cache size or disable it altogether, info at: >> >> http://camel.apache.org/stream-caching.html >> >> On Fri, May 21, 2010 at 8:25 AM, larsa <[email protected]> wrote: >>> Hi, >>> >>> I'm using the http component (camel 2.2.0) to fetch images and most of >>> the >>> time it works well >>> and I can get the body as a ByteArrayInpustream but sometimes it's a >>> FileInputStreamCache. >>> >>> Does anybody know why the FileInputStreamCache is used in some cases? >>> >>> If I only work with the InputStream I get a >>> >>> "java.lang.IllegalArgumentException: Numbers of source Raster bands and >>> source color space components do not match" >>> >>> when trying to create a BufferedImage bImage = >>> ImageIO.read(inputStream); >>> if it is a FileInputStreamCache. >>> >>> Regards Lars >>> -- >>> View this message in context: >>> http://old.nabble.com/Why-is-FileInputStreamCache-used-when-fetching-image-%28.jpg%29-tp28633127p28633127.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> > > > -- View this message in context: http://old.nabble.com/Why-is-FileInputStreamCache-used-when-fetching-image-%28.jpg%29-tp28633127p28633574.html Sent from the Camel - Users mailing list archive at Nabble.com.
