×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    10

    Nokia 3230 and S.E k300i can not handle http Connection read while n6030 can read

    jhd

    hi.

    i have wrtten simple code to read data from html page using httpConnection

    with following code


    Code:
     
     private void sendHttpGet(String url)
        {
            responseMessage = new StringBuffer();
            try{
            
    
            hcon = (HttpConnection)Connector.open(url, 3);
            hcon.setRequestMethod("GET");
           
            dis = new DataInputStream(hcon.openInputStream());
            int j;
            while((j = dis.read()) != -1) 
            {
                responseMessage.append((char)j);
            }
    		
    
    	mainForm.append(responseMessage.toString());	
    
            	}
    	catch(Exception e){
    	    }
    	}
    now what is the problem is when i am runnig tis code with Nokia 6030 it will read the content from given url but when i will install same application on n3230/n7710/sony erricssion k300i

    it will establish connection but will not read content and also it will not connecting to specific url.

    it will give error message Symbain error -33 time out

    Please, any one who know the solution please help....


    Regards,
    Jasmit vala
    [FONT=Courier New][SIZE=7]JHD[/SIZE][/FONT]

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Nokia 3230 and S.E k300i can not handle http Connection read while n6030 can read

    You don't need a DataInputStream if you're reading it this way. Just do:

    Code:
    InputStream is = hcon.openInputStream();
    
    int j;
    while((j = dis.read()) != -1) 
    {
    responseMessage.append((char)j);
    }
    Also check if you are using Internet access points, not Wap ones.

    Daniel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×