- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.SelectableChannel
-
- java.nio.channels.spi.AbstractSelectableChannel
-
- jnr.enxio.channels.NativeDeviceChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,InterruptibleChannel,ReadableByteChannel,WritableByteChannel,NativeSelectableChannel
public class NativeDeviceChannel extends AbstractSelectableChannel implements ByteChannel, NativeSelectableChannel
-
-
Constructor Summary
Constructors Constructor Description NativeDeviceChannel(int fd)NativeDeviceChannel(int fd, boolean isFile)NativeDeviceChannel(SelectorProvider provider, int fd, int ops, boolean isFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFD()protected voidimplCloseSelectableChannel()protected voidimplConfigureBlocking(boolean block)intread(ByteBuffer dst)intvalidOps()intwrite(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
-
-
-
-
Constructor Detail
-
NativeDeviceChannel
public NativeDeviceChannel(int fd)
-
NativeDeviceChannel
public NativeDeviceChannel(int fd, boolean isFile)
-
NativeDeviceChannel
public NativeDeviceChannel(SelectorProvider provider, int fd, int ops, boolean isFile)
-
-
Method Detail
-
implCloseSelectableChannel
protected void implCloseSelectableChannel() throws IOException- Specified by:
implCloseSelectableChannelin classAbstractSelectableChannel- Throws:
IOException
-
implConfigureBlocking
protected void implConfigureBlocking(boolean block) throws IOException- 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
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
-