Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have faced numberformatexception in this code:

Java
try{
    HttpClient httpclient = new DefaultHttpClient();
    
    HttpGet request = new HttpGet();
    URI website = new URI("http://kredo.no-ip.org/SSMA/api/DevicesAPI/GetDevices");
    
    request.setURI(website);
    HttpResponse response = httpclient.execute(request);
    in = new BufferedReader(new InputStreamReader(
        response.getEntity().getContent()));
    // NEW CODE
    String line = in.readLine();
    textv.append(" First line: " + line);
    //                    URI we=website;
    // END OF NEW CODE
    String DEcrypt=AESHelper.decrypt(seedValue, line); // *****This line throws exception
    String s="dsfs";
    String h=s;
    //                textv.append(" Connected ");
}catch(Exception e){
    Log.e("log_tag", "Error in http connection " + e.toString());
}
Posted
Updated 11-May-15 0:07am
v2
Comments
Richard MacCutchan 11-May-15 6:09am    
Use your debugger to see which variable is causing the problem. Maybe seedValue?
Member 11420908 11-May-15 6:33am    
this is my seed value :
String seedValue = "MAKV2SPBNI99212";
Richard MacCutchan 11-May-15 9:19am    
That is not a number.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900