
Originally Posted by
raj_J2ME
Even currently you must be reading the data using the same..is'n it?
You keep on adding the data in the vector or buffer..
Actually i was doing like following
Code:
String response=service.execute(strToSend);
now i tried
Code:
StringBuffer bfrStr=null;
byte[] arrBytes=service.execute(stringToSend).getBytes();
if(arrBytes.length>0)
{
bfrStr=new StringBuffer(arrBytes.length);
for(int i=0;i<arrBytes.length;i++)
{
char c=(char)arrBytes[i];
bfrStr.append(c);
}
}
if(bfrStr!=null)
{
println(bfrStr.toString());
getResponse(bfrStr.toString());
}
Now i am getting arrayIndexOutofBoundsException.
I think of using StreamReader will it be the right approach ?..