jdk/src/share/classes/java/nio/channels/SocketChannel.java
changeset 18212 22f8c33b0690
parent 9679 d98ae8bc45fc
child 18274 7c4289125569
--- a/jdk/src/share/classes/java/nio/channels/SocketChannel.java	Thu Mar 28 06:55:42 2013 -0400
+++ b/jdk/src/share/classes/java/nio/channels/SocketChannel.java	Thu Mar 28 14:34:18 2013 -0700
@@ -493,4 +493,25 @@
         return write(srcs, 0, srcs.length);
     }
 
+    /**
+     * {@inheritDoc}
+     * <p>
+     * If there is a security manager set, its {@code checkConnect} method is
+     * called with the local address and {@code -1} as its arguments to see
+     * if the operation is allowed. If the operation is not allowed,
+     * a {@code SocketAddress} representing the
+     * {@link java.net.InetAddress#getLoopbackAddress loopback} address and the
+     * local port of the channel's socket is returned.
+     *
+     * @return  The {@code SocketAddress} that the socket is bound to, or the
+     *          {@code SocketAddress} representing the loopback address if
+     *          denied by the security manager, or {@code null} if the
+     *          channel's socket is not bound
+     *
+     * @throws  ClosedChannelException     {@inheritDoc}
+     * @throws  IOException                {@inheritDoc}
+     */
+    @Override
+    public abstract SocketAddress getLocalAddress() throws IOException;
+
 }