public class NativeDeviceChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel, NativeSelectableChannel
Modifier and Type | Field and Description |
---|---|
private int |
fd |
private boolean |
isFile |
private int |
validOps |
Constructor and Description |
---|
NativeDeviceChannel(int fd) |
NativeDeviceChannel(int fd,
boolean isFile) |
NativeDeviceChannel(java.nio.channels.spi.SelectorProvider provider,
int fd,
int ops,
boolean isFile) |
Modifier and Type | Method and Description |
---|---|
int |
getFD() |
protected void |
implCloseSelectableChannel() |
protected void |
implConfigureBlocking(boolean block) |
int |
read(java.nio.ByteBuffer dst) |
private static java.nio.channels.spi.SelectorProvider |
selectorProvider(boolean isFile) |
int |
validOps() |
int |
write(java.nio.ByteBuffer src) |
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
begin, close, end, isOpen
private final int fd
private final int validOps
private final boolean isFile
public NativeDeviceChannel(int fd)
public NativeDeviceChannel(int fd, boolean isFile)
public NativeDeviceChannel(java.nio.channels.spi.SelectorProvider provider, int fd, int ops, boolean isFile)
private static java.nio.channels.spi.SelectorProvider selectorProvider(boolean isFile)
protected void implCloseSelectableChannel() throws java.io.IOException
implCloseSelectableChannel
in class java.nio.channels.spi.AbstractSelectableChannel
java.io.IOException
protected void implConfigureBlocking(boolean block) throws java.io.IOException
implConfigureBlocking
in class java.nio.channels.spi.AbstractSelectableChannel
java.io.IOException
public final int validOps()
validOps
in class java.nio.channels.SelectableChannel
public final int getFD()
getFD
in interface NativeSelectableChannel
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
java.io.IOException
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
java.io.IOException