Examples of shutdownInput()


Examples of java.net.Socket.shutdownInput()

      // Close the various streams and the socket.
            try {
    objectOut.flush();
    socket.shutdownOutput();
    socket.shutdownInput();
                objectOut.close();
                out.close();
                objectIn.close();
                in.close();
                socket.close();
View Full Code Here

Examples of java.net.Socket.shutdownInput()

                // Close the various streams and the socket itself.
                try {
        objectOut.flush();
        socket.shutdownOutput();
        socket.shutdownInput();
                    objectOut.close();
                    objectIn.close();
                    out.close();
                    in.close();
                    socket.close();
View Full Code Here

Examples of java.net.Socket.shutdownInput()

        client.close();
        server.close();

        // Regression test for HARMONY-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();
        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // Expected
View Full Code Here

Examples of java.net.Socket.shutdownInput()

        // Regression test for HARMONY-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();
        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // Expected
        }
        s.close();
View Full Code Here

Examples of java.net.Socket.shutdownInput()

     * @tests Socket#shutdownOutput()
     */
    public void test_shutdownInputOutput_twice() throws Exception {
        // regression test for Harmony-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();

        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
View Full Code Here

Examples of java.net.Socket.shutdownInput()

        // regression test for Harmony-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();

        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // expected
        }
        s.shutdownOutput();
View Full Code Here

Examples of java.net.Socket.shutdownInput()

                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here

Examples of java.net.Socket.shutdownInput()

                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here

Examples of java.net.Socket.shutdownInput()

        try {
            this.connected = false;
            if ( socketChannel != null ) {
                Socket socket = socketChannel.socket();
                socket.shutdownOutput();
                socket.shutdownInput();
                socket.close();
                socketChannel.close();
                socket = null;
                socketChannel = null;
            }
View Full Code Here

Examples of java.net.Socket.shutdownInput()

        } finally {
            try {
                // close socket if it's open
                if ((socket != null) && !socket.isClosed()) {
                    socket.shutdownOutput();
                    socket.shutdownInput();
                    socket.close();
                    logger.info("Socket was closed!");
                }
                stopServer();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.