public class UnixSocket extends Socket
| Constructor and Description |
|---|
UnixSocket(UnixSocketChannel chan) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(SocketAddress local) |
void |
close() |
void |
connect(SocketAddress addr) |
void |
connect(SocketAddress addr,
Integer timeout) |
SocketChannel |
getChannel() |
Credentials |
getCredentials()
Retrieves the credentials for this UNIX socket.
|
InetAddress |
getInetAddress() |
InputStream |
getInputStream() |
boolean |
getKeepAlive() |
SocketAddress |
getLocalSocketAddress() |
OutputStream |
getOutputStream() |
int |
getReceiveBufferSize() |
SocketAddress |
getRemoteSocketAddress() |
int |
getSendBufferSize() |
int |
getSoTimeout() |
boolean |
isBound() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
isInputShutdown() |
boolean |
isOutputShutdown() |
void |
setKeepAlive(boolean on) |
void |
setReceiveBufferSize(int size) |
void |
setSendBufferSize(int size) |
void |
setSoTimeout(int timeout) |
void |
shutdownInput() |
void |
shutdownOutput() |
connect, getLocalAddress, getLocalPort, getOOBInline, getPort, getReuseAddress, getSoLinger, getTcpNoDelay, getTrafficClass, sendUrgentData, setOOBInline, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setSoLinger, setTcpNoDelay, setTrafficClass, toStringpublic UnixSocket(UnixSocketChannel chan)
public void bind(SocketAddress local) throws IOException
bind in class SocketIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class SocketIOExceptionpublic void connect(SocketAddress addr) throws IOException
connect in class SocketIOExceptionpublic void connect(SocketAddress addr, Integer timeout) throws IOException
IOExceptionpublic SocketChannel getChannel()
getChannel in class Socketpublic InetAddress getInetAddress()
getInetAddress in class Socketpublic InputStream getInputStream() throws IOException
getInputStream in class SocketIOExceptionpublic SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class Socketpublic OutputStream getOutputStream() throws IOException
getOutputStream in class SocketIOExceptionpublic SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class Socketpublic boolean isConnected()
isConnected in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socketpublic void shutdownInput()
throws IOException
shutdownInput in class SocketIOExceptionpublic void shutdownOutput()
throws IOException
shutdownOutput in class SocketIOExceptionpublic final Credentials getCredentials() throws SocketException
UnsupportedOperationException - if the underlying socket library
doesn't support the SO_PEERCRED optionSocketException - if fetching the socket option failed.public boolean getKeepAlive()
throws SocketException
getKeepAlive in class SocketSocketExceptionpublic int getReceiveBufferSize()
throws SocketException
getReceiveBufferSize in class SocketSocketExceptionpublic int getSendBufferSize()
throws SocketException
getSendBufferSize in class SocketSocketExceptionpublic int getSoTimeout()
throws SocketException
getSoTimeout in class SocketSocketExceptionpublic void setKeepAlive(boolean on)
throws SocketException
setKeepAlive in class SocketSocketExceptionpublic void setReceiveBufferSize(int size)
throws SocketException
setReceiveBufferSize in class SocketSocketExceptionpublic void setSendBufferSize(int size)
throws SocketException
setSendBufferSize in class SocketSocketExceptionpublic void setSoTimeout(int timeout)
throws SocketException
setSoTimeout in class SocketSocketExceptionCopyright © 2017. All rights reserved.