Downloading files to memory |
You can download a file and store it to memory by using the Ftp#download method that takes a java.io.OutputStream as it's first argument and using a java.io.ByteArrayOutputStream.
Example
// create an ByteArrayOutputStream to store data ByteArrayOutputStream bout = new ByteArrayOutputStream();
// download image.gif file and store in stream ftp.download(bout,"image.gif"); |