BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-15-2011, 12:41 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2011
Model: 8900
PIN: N/A
Carrier: Torch
Posts: 59
Post Thanks: 3
Thanked 1 Time in 1 Post
Default Download file

Please Login to Remove!

Hello

I m using Eclipse for developing blackberry app. I hv to download doc & pdf file in such a way that if i click button it download file in pc.


How can I download doc & pdf file. I use httpconnection class but it just open url & read contents of file & save it in string. I search a lot but i didnt fins solution

I am using http url which open dialog to save or open file when i open url in firefox browser.
How can i use httpconnection in this way that it opens url & then download file like file1.doc, file2.pdf

Any body knows?
Offline  
Old 05-08-2011, 11:49 AM   #2 (permalink)
New Member
 
Join Date: May 2011
Model: 7100T
PIN: N/A
Carrier: wtf
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Download file

Code:
ByteArrayOutputStream output = new ByteArrayOutputStream();
        int ch;
        while ((ch = input.read()) != -1) {
            output.write(ch);
        }
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: Download file
Thread Thread Starter Forum Replies Last Post
Built HelloWorld App; No Errors; But Can't get it to run in Simulator doni49 Developer Forum 14 10-06-2009 10:19 PM
BBNotePad 1.0.5 -- text edit software (Updated July 30) qinjg8008 Aftermarket Software 156 08-20-2009 03:58 PM
Which file to upload Jar or Jad to the web to download to Pearl??? yellowsky General 8100 Series Discussion - Pearl 3 04-02-2007 01:17 PM
Vodafone and Dimension Today Themes (7100/7130) - Download & Installation Information jibi BlackBerry Themes 61 11-13-2006 06:59 PM





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.