Java Socket get00BInline() method

The get00BInline() method of Java Socket class tests whether the S0_00BINLINE option is enabled or not.

Syntax

Parameter

NA

Return

The get00BInline() method returns a Boolean value 'true if the S0_00BINLINE is enabled else it returns false.

Throws

SocketException - if an error is there in the protocol, such as a TCP error.

Example 1

Test it Now

Output:

S0_00BINLINE is enabled: true

Example 2

Test it Now

Output:

S0_00BINLINE is enabled: false

Example 3

Test it Now

Output:

Exception in thread "main" java.net.SocketException: Socket is closed
	at java.net.Socket.set00BInline(Socket.java:1097)
	at com.javaTpoint.JavaSocketGet00BInlineExample2.main(JavaSocketGet00BInlineExample2.java:13)




Latest Courses