< prev index next >
test/java/nio/channels/spi/SelectorProvider/inheritedChannel/CloseTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 32,42 ****
* service then delays/lingers for 15 seconds before shuting down. To
* prove that the close works we check that we see EOF (meaning the
* peer has closed the connection) in less than 15 seconds.
*/
import java.nio.ByteBuffer;
! import java.nio.channels.*;
public class CloseTest {
public static void main(String args[]) throws Exception {
String msg = "HELLO";
--- 32,44 ----
* service then delays/lingers for 15 seconds before shuting down. To
* prove that the close works we check that we see EOF (meaning the
* peer has closed the connection) in less than 15 seconds.
*/
import java.nio.ByteBuffer;
! import java.nio.channels.SelectionKey;
! import java.nio.channels.Selector;
! import java.nio.channels.SocketChannel;
public class CloseTest {
public static void main(String args[]) throws Exception {
String msg = "HELLO";
< prev index next >