In your code you should read the complete data available in the
responseStream because the stream may don't give complete data at one
attempt.
You need to call read method on responseStream till it ends. ( i.e:
read bytes size -1)
i.e read the data till you got end of stream.
then convert it to
Like
int read_cnt = 0;
byte[] byteresp = new byte[1024];
int len =
responseStream.available();
while(read_cnt len)
{
int size = len - read_cnt;
int nR = responseStream.read(byteresp, 0, (size1024?1024:(int)size));
Thanks. I've tried the following, but it just doesn't output anything
at all - any ideas what might be wrong? I'll try to debug too:
InputStream responseStream =
method.getResponseBodyAsStream();
responseString =
3 matches
Mail list logo