BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   read .txt file from URL (http://www.blackberryforums.com/developer-forum/261583-read-txt-file-url.html)

fajriym 09-18-2012 11:53 PM

read .txt file from URL
 
hi advance, i'm newbie here ;-)
could you please to help me :cry:
my ex. case is:
i've uploaded .txt file to server
how can i read the .txt file from server URL and retrieve it to the app :oops:
thanks before

hrbuckley 09-19-2012 12:53 PM

Re: read .txt file from URL
 
You will simply need to open a connection to the server with the appropriate URL and read the text file from the input stream.

If you are targeting BlackBerry OS 5.0 or later you may use the ConnectionFactory. For OS versions before that you will have to use the HttpConnection.

fajriym 09-20-2012 10:10 PM

Re: read .txt file from URL
 
thanks before, but could you mind giving me an example code
i use blackberry OS 5

hrbuckley 09-21-2012 09:53 AM

Re: read .txt file from URL
 
There is example code in the API documentation for HttpConnection.


All times are GMT -5. The time now is 04:06 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.