1 Reply Latest reply on Mar 19, 2013 3:26 AM by Claus Ibsen

    Camel Route based on java.nio?

    stephen daniel Newbie



      I just want to know if Camel is based on the java.nio to do some operations with files?


      And when Camel routes some files, what exactly camel do? Is it copy the files to the target or read the files and write it in the target??



        • 1. Re: Camel Route based on java.nio?
          Claus Ibsen Master

          Yes for the file producer java nio is used to write files.


          The file consumer is using a scheduled thread pool to trigger and run where it scans for new files to pickup.


          Camel will by default route the java.io.File handle. And only read the file content on demand.


          So if you do a

            from file a
             to file b


          Then Camel will try at first to move the file from a -> b. And if that is not possible, it will copy the file using streaming with java nio.