480481482483484485486487488489490
for (int i = 0; i > -1; i = input.read(myBuff)) { synchronized (output){ output.write(myBuff,0,i); output.flush(); output.notifyAll(); } if(!owner.isRunning()){ break; } }