:
bis.readLine()
As I recall, it will try to read into the buffer until it finds it '\n'. But what if it never sets off?
My ugly version violates any design pattern and other recommendations, but it always works:
int bytesExpected = clientSocket.available();
int[] buffer = new int[bytesExpected];
int readCount = clientSocket.read(buffer);
You should also add checks to handle errors and interrupts. With webservices results, this is what worked for me (2-10 MB was the maximum result that I sent)
user529543
source
share