Java.lang.arrayindexoutofboundexception
below function works for some farmsid but when I retrieve data with more than approx. 30 rows I am getting java.lang.arrayindexoutofboundexception:length=15802;regionstart=1;regi
Solution 1:
change
int contentLength = (int) responseEntity.getContentLength();
char[] buffer = newchar[contentLength];
stream = responseEntity.getContent();
InputStreamReader reader = newInputStreamReader(stream);
int hasRead = 0;
while (hasRead < contentLength)
hasRead += reader.read(buffer, hasRead, contentLength-hasRead);
stream.close();
with
Stringbuffer= EntityUtils.toString(responseEntity);
Post a Comment for "Java.lang.arrayindexoutofboundexception"