protect write loop

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@706 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-08-13 01:27:59 +00:00
parent 2eb8343277
commit e9c6245eb6
1 changed files with 11 additions and 0 deletions

View File

@ -227,6 +227,17 @@ public class IO
out.write(buffer,0,len);
}
}
else if (out instanceof PrintWriter)
{
PrintWriter pout=(PrintWriter)out;
while (!pout.checkError())
{
len=in.read(buffer,0,bufferSize);
if (len==-1)
break;
out.write(buffer,0,len);
}
}
else
{
while (true)