diff --git a/src/java.base/share/classes/java/net/Socket.java b/src/java.base/share/classes/java/net/Socket.java index 23c225fbb2d29..6fd4baf8a0843 100644 --- a/src/java.base/share/classes/java/net/Socket.java +++ b/src/java.base/share/classes/java/net/Socket.java @@ -1010,8 +1010,9 @@ public SocketChannel getChannel() { * *

If this socket has an associated channel then the resulting input * stream delegates all of its operations to the channel. If the channel - * is in non-blocking mode then the input stream's {@code read} operations - * will throw an {@link java.nio.channels.IllegalBlockingModeException}. + * is in non-blocking mode then the input stream's {@code read} and + * {@code skip} operations will throw an + * {@link java.nio.channels.IllegalBlockingModeException}. * *

Reading from the input stream is {@linkplain Thread#interrupt() * interruptible} in the following circumstances: @@ -1019,9 +1020,9 @@ public SocketChannel getChannel() { *

  • The socket is {@linkplain SocketChannel#socket() associated} with * a {@link SocketChannel SocketChannel}. * In that case, interrupting a thread reading from the input stream - * will close the underlying channel and cause the read method to - * throw {@link ClosedByInterruptException} with the interrupt - * status set. + * will close the underlying channel and cause the read and skip + * methods to throw {@link ClosedByInterruptException} with the + * interrupt status set. *
  • The socket uses the system-default socket implementation and a * {@linkplain Thread#isVirtual() virtual thread} is reading from the * input stream. In that case, interrupting the virtual thread will @@ -1410,6 +1411,9 @@ public boolean getOOBInline() throws SocketException { * The option must be enabled prior to entering the blocking operation * to have effect. * + *

    Behavior of any other method call on the InputStream associated with + * this Socket is implementation specific. + * * @param timeout the specified timeout, in milliseconds. * @throws SocketException if there is an error in the underlying protocol, * such as a TCP error, or the socket is closed.