You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sreejith S <sr...@gmail.com> on 2016/11/08 13:04:41 UTC
Multipart download in FTPClient
Hi All,
When dealing with large files , say 1 G, FTPClient end up in a memory
exception. Does FTPClient supports multi part download option ? I feel this
would be the solution to solve this memory issue.
Any pointers please.
Thanks,
Sreejith
--
*Sreejith.S*
https://github.com/srijiths/
http://srijiths.wordpress.com/
tweet2sree@twitter <http://tweet2Sree>
Re: Multipart download in FTPClient
Posted by Sreejith S <sr...@gmail.com>.
Thank you Sebb. Will try this out.
On Tue, Nov 8, 2016 at 10:13 PM, sebb <se...@gmail.com> wrote:
> Are you referring to Commons NET FTPClient?
>
> If so, that has methods for writing the data to an output stream as it
> arrives:
>
> http://commons.apache.org/proper/commons-net/javadocs/
> api-3.5/org/apache/commons/net/ftp/FTPClient.html#
> retrieveFile(java.lang.String,%20java.io.OutputStream)
>
> This does not take more memory for larger files.
>
> See also the example app:
>
> https://commons.apache.org/proper/commons-net/#Examples
>
> Source:
>
> https://commons.apache.org/proper/commons-net/examples/
> ftp/FTPClientExample.java
>
> You can run the FTPClientExample as indicated above:
>
> java -jar [path]/commons-net-examples-3.5 FTPClientExample -b user
> pass host remote local
> or
> java -jar [path]/commons-net-examples-3.5 FTPClientExample -b -A host
> remote local
> for anonymous login
>
> The -b is binary mode, which is almost certainly needed for large
> files, which are unlikely to be text.
>
>
>
> On 8 November 2016 at 13:04, Sreejith S <sr...@gmail.com> wrote:
> > Hi All,
> >
> > When dealing with large files , say 1 G, FTPClient end up in a memory
> > exception. Does FTPClient supports multi part download option ? I feel
> this
> > would be the solution to solve this memory issue.
> >
> > Any pointers please.
> >
> > Thanks,
> > Sreejith
> >
> > --
> >
> >
> > *Sreejith.S*
> > https://github.com/srijiths/
> > http://srijiths.wordpress.com/
> > tweet2sree@twitter <http://tweet2Sree>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
--
*Sreejith.S*
https://github.com/srijiths/
http://srijiths.wordpress.com/
tweet2sree@twitter <http://tweet2Sree>
Re: Multipart download in FTPClient
Posted by sebb <se...@gmail.com>.
Are you referring to Commons NET FTPClient?
If so, that has methods for writing the data to an output stream as it arrives:
http://commons.apache.org/proper/commons-net/javadocs/api-3.5/org/apache/commons/net/ftp/FTPClient.html#retrieveFile(java.lang.String,%20java.io.OutputStream)
This does not take more memory for larger files.
See also the example app:
https://commons.apache.org/proper/commons-net/#Examples
Source:
https://commons.apache.org/proper/commons-net/examples/ftp/FTPClientExample.java
You can run the FTPClientExample as indicated above:
java -jar [path]/commons-net-examples-3.5 FTPClientExample -b user
pass host remote local
or
java -jar [path]/commons-net-examples-3.5 FTPClientExample -b -A host
remote local
for anonymous login
The -b is binary mode, which is almost certainly needed for large
files, which are unlikely to be text.
On 8 November 2016 at 13:04, Sreejith S <sr...@gmail.com> wrote:
> Hi All,
>
> When dealing with large files , say 1 G, FTPClient end up in a memory
> exception. Does FTPClient supports multi part download option ? I feel this
> would be the solution to solve this memory issue.
>
> Any pointers please.
>
> Thanks,
> Sreejith
>
> --
>
>
> *Sreejith.S*
> https://github.com/srijiths/
> http://srijiths.wordpress.com/
> tweet2sree@twitter <http://tweet2Sree>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org