Downloading files to memory

Top  Previous  Next

You can download a file and store it to memory by using the Ftps#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

ftps.download(bout,"image.gif");  





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC