Package jnr.enxio.channels
Class NativeSocketChannel
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.SelectableChannel
java.nio.channels.spi.AbstractSelectableChannel
jnr.enxio.channels.NativeSocketChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ByteChannel
,Channel
,InterruptibleChannel
,ReadableByteChannel
,WritableByteChannel
,NativeSelectableChannel
public class NativeSocketChannel
extends AbstractSelectableChannel
implements ByteChannel, NativeSelectableChannel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNativeSocketChannel
(int fd) NativeSocketChannel
(int fd, int ops) NativeSocketChannel
(SelectorProvider provider, int fd, int ops) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
getFD()
protected void
protected void
implConfigureBlocking
(boolean block) int
read
(ByteBuffer dst) void
void
final int
validOps()
int
write
(ByteBuffer src) 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
-
Field Details
-
fd
private final int fd -
validOps
private final int validOps -
SHUT_RD
private static final int SHUT_RD -
SHUT_WR
private static final int SHUT_WR
-
-
Constructor Details
-
NativeSocketChannel
public NativeSocketChannel(int fd) -
NativeSocketChannel
public NativeSocketChannel(int fd, int ops) -
NativeSocketChannel
NativeSocketChannel(SelectorProvider provider, int fd, int ops)
-
-
Method Details
-
implCloseSelectableChannel
- Specified by:
implCloseSelectableChannel
in classAbstractSelectableChannel
- Throws:
IOException
-
implConfigureBlocking
- Specified by:
implConfigureBlocking
in classAbstractSelectableChannel
- Throws:
IOException
-
validOps
public final int validOps()- Specified by:
validOps
in classSelectableChannel
-
getFD
public final int getFD()- Specified by:
getFD
in interfaceNativeSelectableChannel
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
shutdownInput
- Throws:
IOException
-
shutdownOutput
- Throws:
IOException
-