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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intgetFD()protected voidprotected voidimplConfigureBlocking(boolean block) intread(ByteBuffer dst) voidvoidfinal intvalidOps()intwrite(ByteBuffer src) Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, registerMethods inherited from class java.nio.channels.SelectableChannel
registerMethods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Constructor Details
-
NativeSocketChannel
public NativeSocketChannel(int fd) -
NativeSocketChannel
public NativeSocketChannel(int fd, int ops)
-
-
Method Details
-
implCloseSelectableChannel
- Specified by:
implCloseSelectableChannelin classAbstractSelectableChannel- Throws:
IOException
-
implConfigureBlocking
- Specified by:
implConfigureBlockingin classAbstractSelectableChannel- Throws:
IOException
-
validOps
public final int validOps()- Specified by:
validOpsin classSelectableChannel
-
getFD
public final int getFD()- Specified by:
getFDin interfaceNativeSelectableChannel
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
shutdownInput
- Throws:
IOException
-
shutdownOutput
- Throws:
IOException
-