# HG changeset patch # User michaelm # Date 1573728008 0 # Node ID 85df93a18fe0b7b91f34c96155216f841847fcaa # Parent 998df1368ccae3f1a78979df0d2f8bf13a831993 unixdomainchannels: apidoc updates diff -r 998df1368cca -r 85df93a18fe0 src/java.base/share/classes/java/nio/channels/UnixDomainSocketAddress.java --- a/src/java.base/share/classes/java/nio/channels/UnixDomainSocketAddress.java Thu Nov 14 10:16:28 2019 +0000 +++ b/src/java.base/share/classes/java/nio/channels/UnixDomainSocketAddress.java Thu Nov 14 10:40:08 2019 +0000 @@ -32,15 +32,15 @@ import java.util.Objects; /** - * An address for a Unix domain socket or server socket channel. These - * addresses contain a String path name, which when bound to a channel, + * An address for a Unix domain {@link SocketChannel} or {@link ServerSocketChannel}. + * These addresses contain a String path name, which when bound to a channel, * have an associated file in the file-system with the same name. *

* If a channel is automatically bound to a Unix domain address then its address * is unnamed; it has an empty path field, and therefore has no associated - * file in the file-system. - *

- * Note, not all channel types support Unix domain addresses. + * file in the file-system. {@link SocketChannel}s can be automatically bound + * in this way, but {@link ServerSocketChannel}s cannot and must be bound to + * an explicit address. * * @since 14 */ @@ -118,6 +118,12 @@ return this.path.equals(that.path); } + /** + * Returns a string representation of this {@code UnixDomainSocketAddress}. + * The format of the string is {@code "af_unix:"} where {@code } + * is this address's path field, which will be empty in the case of an + * unnamed socket address. + */ @Override public String toString() { StringBuilder sb = new StringBuilder();