Hi Camel will convert whatever your expression returns to something that it iterates. For non streams it will walk the list before they are processed, so it will know the total size.
If you have a very large document you can use streaming to split it on-the-fly. However then the total size is not known. On Wed, Apr 8, 2009 at 10:50 PM, javadevel <javadeve...@yahoo.com> wrote: > > I need to use a splitter expression to split a very large document with > rather complex splitting requirement. Based on the documentation provided on > the Apache Camel Splitter, I can write a Bean or implement the Expression > interface and return java.util.Collection or java.util.Iterator. However, > it only works with collections because the iterator interface does not > provide a getSize method the Camel router can use to set the splittersize > header. If my observation is correct, please modify the documentation to say > it must only return a java.util.Collection or modify the code so that it > supports iterator too. If it supports iterator it will be extremely useful > because we may not always know the splittersize especially when the data is > huge and passed as an inputstream. > -- > View this message in context: > http://www.nabble.com/splitter-expression-tp22959250p22959250.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration