java.lang.Object
java.net.SocketAddress
java.net.UnixDomainSocketAddress
- All Implemented Interfaces:
Serializable
A Unix domain socket address. A Unix domain socket address encapsulates a file-system path that Unix domain sockets bind or connect to.
AnunnamedUnixDomainSocketAddress has an empty path. The local address of aSocketChannel to a Unix domain socket that isautomatically orimplicitly bound will be unnamed.
Path objects used to create instances of this class must be obtained from thesystem-default file system.
- Since:
- 16
- See Also:
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this address with another object.getPath()Returns this address's path.inthashCode()Returns the hash code of thisUnixDomainSocketAddressstaticUnixDomainSocketAddressCreates a UnixDomainSocketAddress from the given path string.staticUnixDomainSocketAddressCreates a UnixDomainSocketAddress for the given path.toString()Returns a string representation of thisUnixDomainSocketAddress.
Method Details
of
Creates a UnixDomainSocketAddress from the given path string.- Parameters:
pathname- The path string, which can be empty- Returns:
- A UnixDomainSocketAddress
- Throws:
InvalidPathException- If the path cannot be converted to a PathNullPointerException- if pathname isnull
of
Creates a UnixDomainSocketAddress for the given path.- Parameters:
path- The path to the socket, which can be empty- Returns:
- A UnixDomainSocketAddress
- Throws:
IllegalArgumentException- If the path is not associated with the default file systemNullPointerException- if path isnull
getPath
hashCode
equals
toString