public class UnixSocketChannel extends AbstractNativeSocketChannel
Channel implementation that uses a native unix
socketgetFD, implCloseSelectableChannel, implConfigureBlocking, read, setFD, shutdownInput, shutdownOutputopen, read, validOps, writeblockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, registerregisterbegin, close, end, isOpenpublic static final UnixSocketChannel open() throws IOException
IOExceptionpublic static final UnixSocketChannel open(UnixSocketAddress remote) throws IOException
IOExceptionpublic static final UnixSocketChannel create() throws IOException
IOExceptionpublic static final UnixSocketChannel[] pair() throws IOException
IOExceptionpublic static final UnixSocketChannel fromFD(int fd)
fd - the file descriptor to wrappublic boolean connect(UnixSocketAddress remote) throws IOException
IOExceptionpublic boolean isConnected()
isConnected in class SocketChannelpublic boolean isConnectionPending()
isConnectionPending in class SocketChannelpublic boolean finishConnect()
throws IOException
finishConnect in class SocketChannelIOExceptionpublic final UnixSocketAddress getRemoteSocketAddress()
public final UnixSocketAddress getLocalSocketAddress()
public boolean connect(SocketAddress remote) throws IOException
connect in class SocketChannelIOExceptionpublic UnixSocket socket()
socket in class SocketChannelpublic long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface GatheringByteChannelwrite in class AbstractNativeSocketChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in class AbstractNativeSocketChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface WritableByteChannelwrite in class AbstractNativeSocketChannelIOExceptionpublic SocketAddress getRemoteAddress() throws IOException
getRemoteAddress in class SocketChannelIOExceptionpublic SocketAddress getLocalAddress() throws IOException
getLocalAddress in interface NetworkChannelgetLocalAddress in class SocketChannelIOExceptionpublic final Set<SocketOption<?>> supportedOptions()
public <T> T getOption(SocketOption<T> name) throws IOException
IOExceptionpublic <T> SocketChannel setOption(SocketOption<T> name, T value) throws IOException
setOption in interface NetworkChannelsetOption in class SocketChannelIOExceptionpublic UnixSocketChannel bind(SocketAddress local) throws IOException
bind in interface NetworkChannelbind in class SocketChannelIOExceptionCopyright © 2017. All rights reserved.