I have implemented a read/write stream to read a buffer, manipulate the data(like adding headers and footers during output file creation) and write it to a file. What should I do to instead of writing to a file locally,开发者_JAVA技巧 to write to a file in a remote location, but I have only FTP access to the remote server.
I wrote a client using POCO to transfer the file to the ftp server, but it is a two step process. How can I implement a solution which directly writes to the FTP server? I am not able to get how to connect a source stream(which is actually a ReadFile call) to the FTP network stream?
Thanks.
You need an FTP client library that you can call directly from your app, to avoid the need to write the file to disk and then send it via a separate process.
This earlier question has some useful info.
精彩评论