Java Socket isOutputShutdown() methodLast Updated : 17 Mar 2025 The isOutputShutdown () method of Java Socket class returns a Boolean value 'true' if the write-half of the socket connection has been closed successfully, else it returns false. SyntaxParameterNA ReturnThe isOutputShutdown () method would return a Boolean value 'true' if the output of the socket has been shut down. Example 1Output: The socket is connected: true The socket is bounded: true Output is shutdown: true Example 2Output: The socket is connected: true The socket is bounded: true Output is shutdown: false Example 3Output: Exception in thread "main" java.net.SocketException: Socket is not connected at java.net.Socket.shutdownOutput(Socket.java:1553) at com.tpointtech.JavaSocketIsOutputShutdownExample3.main(JavaSocketIsOutputShutdownExample3.java:10) Next TopicJava Socket Class |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India