HttpConnection (How to make a Thread)
1 posts in topic
Flat View  Flat View

Posted By:   Jyri_Saastamoinen
Posted On:   Wednesday, November 19, 2003 03:11 AM


I need to make a HttpConnection to a a server to read some files (text files) to a Midlet. How can I do that with Threads? I know how that connection works but those threads are kind of strange to me. Do I really need threads or can I do that with servlet?



Re: HttpConnection (How to make a Thread)

Posted By:   Mandar_Shinde  
Posted On:   Wednesday, December 3, 2003 09:10 PM

There aint no need for threads, U can simple create a httpconnection to Ur server.

import javax.io.microedition.*;

HttpConnection conn = (HttpConnection) Connector.open(http://:);

U can read each file as a stream like a normal InputStream; but not retrieve them as files.

About | Sitemap | Contact