Hello,
How do I save a remote file (i.e. http://example.com/somefile.pdf) to blackberry's local disk from my custom app
Thanks
Hello,
How do I save a remote file (i.e. http://example.com/somefile.pdf) to blackberry's local disk from my custom app
Thanks
Open a HttpConnection with Connector.open(URL). Then open an InputStream from that connection e.g:
HttpConnection conn = (HttpConnection) Connector.open("http://example.com/somefile.pdf");
InputStream in = conn.openInputStream();
Edit: To save the file to a disk open a FileConnection and open an OutputStream from there. e.g:
FileConnection file = (FileConnection) Connector.open("file:///store/home/user/myfile.pdf");
file.create();
OutputStream out = file.openOutputStream();