(keitai-l) Re: Can i Open a socket connection using DOCOMO api

From: Manish Prabhune <applet_graphics_at_yahoo.com>
Date: 08/09/01
Message-ID: <00a601c12098$39c38fc0$43fe10ac@int.pix.co.jp>
If you mean to open a socket and read data from the stream then yes you can.

Use

try{
	HttpConnection hc =
(HttpConnection)Connector.open("http://yoursite.com/data.txt",Connector.READ
,true);
		hc.setRequestMethod(HttpConnection.GET);
             	hc.connect();
             	InputStream is = hc.openInputStream();


//************************************************************************
		// This initializes the number of bytes to the length og our data
download
		// So that we need not randomly initialize it as = new byte[1000]

//************************************************************************

	     	byte[] text1=new byte[3];
	     	byte[] text2=new byte[1];

            is.read(text1);
  	s = new String(text1);
 }

		is.close();
		hc.close();

	}catch(Exception e){}

Hope this works for you.
See detailed source code at www.imodeindia.com

Manish
www.imodeindia.com


----- Original Message -----
From: "Maneesh Agarwal" <maneesh@netesoft.com>
To: <keitai-l@appelsiini.net>
Sent: Thursday, August 09, 2001 2:32 PM
Subject: (keitai-l) Can i Open a socket connection using DOCOMO api


> Hi all
> Can i open a Socket connection to a server usng DoCoMo Api.?
> Is there some class provided bt docomo which i can use to transfer bytes.?
>
> Please check more information on imode at http://www.virelex.com/
> Thanks in advance
> Maneesh Agarwal
>
>
>
> [ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Thu Aug 9 08:47:06 2001