Socket inputstream read failure
0 posts in topic
Flat View  Flat View

Posted By:   Michael_Tang
Posted On:   Tuesday, December 2, 2008 04:33 AM

why the last bit of reading of input stream need to wait for one or minutes to end, which results in the client socket timeout, is there any approach to read the input stream data?

See the code below

String request = null;
ByteArrayOutputStream bis = new ByteArrayOutputStream();
while ((count = in.read(bytes)) >= 0) {
System.out.println("count = " + count);
bis.write(bytes, 0, count);


About | Sitemap | Contact