Examples of shutdownOutput()


Examples of java.net.Socket.shutdownOutput()

        Socket sock = this.socket;
        try {
            doFlush();
            try {
                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        Socket sock = this.socket;
        try {
            doFlush();
            try {
                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        // Regression test for HARMONY-873
        ServerSocket ss2 = new ServerSocket(0);
        Socket s = new Socket("127.0.0.1", ss2.getLocalPort());
        ss2.accept();
        s.shutdownOutput();
        try {
            s.getOutputStream();
            fail("should throw SocketException");
        } catch (SocketException e) {
            // expected
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        // make sure we get the right answer with newly connected socket
        assertFalse("Socket indicated output shutdown when it should not have",
                worker.isOutputShutdown());

        // shutdown the output
        worker.shutdownOutput();

        // make sure we get the right answer once it is shut down
        assertTrue(
                "Socket indicated output was NOT shutdown when it should have been",
                worker.isOutputShutdown());
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        theOutput.flush();

        // Send the urgent data byte which should not be received
        worker.sendUrgentData("UrgentData".getBytes()[0]);
        theOutput.write(sendString.getBytes());
        worker.shutdownOutput();
        worker.close();

        // Try to read the bytes back
        int totalBytesRead = 0;
        byte[] myBytes = new byte[100];
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        byte urgentByte = "UrgentData".getBytes()[0];
        worker.sendUrgentData(urgentByte);

        // Send more data, the urgent byte must stay in position
        theOutput.write(sendString.getBytes());
        worker.shutdownOutput();
        worker.close();

        // Try to read the bytes back
        totalBytesRead = 0;
        myBytes = new byte[100];
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        worker.sendUrgentData(urgentByte1);
        worker.sendUrgentData(urgentByte2);

        // Send more data, the urgent byte must stay in position
        theOutput.write(sendString.getBytes());
        worker.shutdownOutput();
        worker.close();

        // Try to read the bytes back
        totalBytesRead = 0;
        myBytes = new byte[100];
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        Socket worker = server.accept();
        OutputStream theOutput = worker.getOutputStream();

        // shutdown the output
        worker.shutdownOutput();

        // send the regular data
        String sendString = new String("Test");
        try {
            theOutput.write(sendString.getBytes());
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

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

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

Examples of java.net.Socket.shutdownOutput()

        // Regression test for HARMONY-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownOutput();
        try {
            s.shutdownOutput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // Expected
        }
        s.close();
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.