public class UnixDomainSocket
extends java.net.Socket
Socket backed by a native Unix domain socket.
Instances of this class always return null for
Socket.getInetAddress(), Socket.getLocalAddress(),
Socket.getLocalSocketAddress(), Socket.getRemoteSocketAddress().| Constructor and Description |
|---|
UnixDomainSocket(int fd)
Creates a Unix domain socket backed by a native file descriptor.
|
UnixDomainSocket(java.lang.String path)
Creates a Unix domain socket backed by a file path.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream() |
boolean |
isClosed() |
boolean |
isInputShutdown() |
boolean |
isOutputShutdown() |
void |
shutdownInput() |
void |
shutdownOutput() |
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isConnected, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toStringpublic UnixDomainSocket(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic UnixDomainSocket(int fd)
public java.io.InputStream getInputStream()
getInputStream in class java.net.Socketpublic java.io.OutputStream getOutputStream()
getOutputStream in class java.net.Socketpublic void shutdownInput()
throws java.io.IOException
shutdownInput in class java.net.Socketjava.io.IOExceptionpublic void shutdownOutput()
throws java.io.IOException
shutdownOutput in class java.net.Socketjava.io.IOExceptionpublic boolean isInputShutdown()
isInputShutdown in class java.net.Socketpublic boolean isOutputShutdown()
isOutputShutdown in class java.net.Socketpublic boolean isClosed()
isClosed in class java.net.Socketpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.net.Socketjava.io.IOException