195196197198199200201202203204205
} QAUtil.sleep(1500); try { con.readByte(); Assert.fail("ClosedChannelException expected"); } catch (ClosedChannelException expected) { } server.close(); }
7273747576777879808182
Assert.assertTrue(header.indexOf("Connection: close") != -1); QAUtil.sleep(400); try { con.readByte(); Assert.fail("ClosedChannelException expected"); } catch (ClosedChannelException expected) { }
109110111112113114115116117118119
193194195196197198199200201202203
7475767778798081828384
Assert.assertTrue(header.indexOf("Connection: close") != -1); QAUtil.sleep(400); try { con.readByte(); Assert.fail("ClosedChannelException expected"); } catch (ClosedChannelException expected) { } } else {
119120121122123124125126127128129
8283848586878889909192
bc.write("Hello World".getBytes("UTF-8")); bc.write((byte) 0xFF); while (true) { System.out.print((int) bc.readByte() + " "); } }
118119120121122123124125126127128
bc.write((byte) 0xFF); for (int i = 0; i < 6; i++) { System.out.print((int) bc.readByte() + " "); } System.out.println("finished"); }