On Sat, Nov 6, 2010 at 2:20 PM, Rickard Öberg <[email protected]> wrote:
> I'm not sure that's the best example, since for reading files like that you > will end up with one object (a PDF-document) rather than 1-line->1 > PDF-object. But for any such transformation, like the String2JSON example, > you just create your own Function<From,To>. A "line" is a pretty specific 'case', and only applicable for text data (not even necessary String data). For instance, it is not possible to do XML parsing to let's say JSON, on a line-by-line either... > There is an assumption that the transfer is done synchronously. When > Sender.sendTo() returns the Receiver is allowed to clean up its resources > that it was writing to, so if the Sender calls receive(item) later on, > asynchronously, that screws things up. It would probably be better to create > a separate API for that usecase, since it is quite different. Ok, that perhaps makes sense. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

