java - How to close input stream of FTP inbound endpoint in Mule when streaming is used -


i have simple configuration copies file ftp server file outbound. using streaming file transfer because of huge file sizes. config:

 <ftp:connector name="ftpconnector" streaming="true" pollingfrequency="360000"/>      <flow name="copyftptofile">         <ftp:inbound-endpoint name="ftp" connector-ref="ftpconnector" host="ftp" port="21" user="test" password="test" path="/testenv" />         <file:outbound-endpoint path="/vendor/in" />     </flow> 

i not sure how close input-stream files deleted ftp server once copied.

since payload inputstream, following code of file outbound endpoint dispatcher executed:

inputstream = event.transformmessage(datatypefactory.create(inputstream.class)); ioutils.copylarge(is, fos); is.close(); 

so stream should automatically closed you.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -