- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.SelectableChannel
-
- java.nio.channels.spi.AbstractSelectableChannel
-
- java.nio.channels.SocketChannel
-
- jnr.unixsocket.impl.AbstractNativeSocketChannel
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ByteChannel
,Channel
,GatheringByteChannel
,InterruptibleChannel
,NetworkChannel
,ReadableByteChannel
,ScatteringByteChannel
,WritableByteChannel
,jnr.enxio.channels.NativeSelectableChannel
- Direct Known Subclasses:
UnixSocketChannel
public abstract class AbstractNativeSocketChannel extends SocketChannel implements ByteChannel, jnr.enxio.channels.NativeSelectableChannel
-
-
Constructor Summary
Constructors Constructor Description AbstractNativeSocketChannel(int fd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFD()
protected void
implCloseSelectableChannel()
protected void
implConfigureBlocking(boolean block)
int
read(ByteBuffer dst)
long
read(ByteBuffer[] dsts, int offset, int length)
void
setFD(int fd)
SocketChannel
shutdownInput()
SocketChannel
shutdownOutput()
int
write(ByteBuffer src)
long
write(ByteBuffer[] srcs, int offset, int length)
-
Methods inherited from class java.nio.channels.SocketChannel
bind, connect, finishConnect, getLocalAddress, getRemoteAddress, isConnected, isConnectionPending, open, open, read, setOption, socket, validOps, write
-
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
-
Methods inherited from class java.nio.channels.SelectableChannel
register
-
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.nio.channels.NetworkChannel
getOption, supportedOptions
-
-
-
-
Method Detail
-
setFD
public void setFD(int fd)
-
getFD
public final int getFD()
- Specified by:
getFD
in interfacejnr.enxio.channels.NativeSelectableChannel
-
implCloseSelectableChannel
protected void implCloseSelectableChannel() throws IOException
- Specified by:
implCloseSelectableChannel
in classAbstractSelectableChannel
- Throws:
IOException
-
implConfigureBlocking
protected void implConfigureBlocking(boolean block) throws IOException
- Specified by:
implConfigureBlocking
in classAbstractSelectableChannel
- Throws:
IOException
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in classSocketChannel
- Throws:
IOException
-
read
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException
- Specified by:
read
in interfaceScatteringByteChannel
- Specified by:
read
in classSocketChannel
- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classSocketChannel
- Throws:
IOException
-
write
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException
- Specified by:
write
in interfaceGatheringByteChannel
- Specified by:
write
in classSocketChannel
- Throws:
IOException
-
shutdownInput
public SocketChannel shutdownInput() throws IOException
- Specified by:
shutdownInput
in classSocketChannel
- Throws:
IOException
-
shutdownOutput
public SocketChannel shutdownOutput() throws IOException
- Specified by:
shutdownOutput
in classSocketChannel
- Throws:
IOException
-
-