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:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.ByteChannel
,java.nio.channels.Channel
,java.nio.channels.InterruptibleChannel
,java.nio.channels.ReadableByteChannel
,java.nio.channels.WritableByteChannel
,NativeSelectableChannel
public class NativeSocketChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel, NativeSelectableChannel
-
-
Constructor Summary
Constructors Constructor Description NativeSocketChannel(int fd)
NativeSocketChannel(int fd, int ops)
-
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(java.nio.ByteBuffer dst)
void
shutdownInput()
void
shutdownOutput()
int
validOps()
int
write(java.nio.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.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
-
-
-
Method Detail
-
implCloseSelectableChannel
protected void implCloseSelectableChannel() throws java.io.IOException
- Specified by:
implCloseSelectableChannel
in classjava.nio.channels.spi.AbstractSelectableChannel
- Throws:
java.io.IOException
-
implConfigureBlocking
protected void implConfigureBlocking(boolean block) throws java.io.IOException
- Specified by:
implConfigureBlocking
in classjava.nio.channels.spi.AbstractSelectableChannel
- Throws:
java.io.IOException
-
validOps
public final int validOps()
- Specified by:
validOps
in classjava.nio.channels.SelectableChannel
-
getFD
public final int getFD()
- Specified by:
getFD
in interfaceNativeSelectableChannel
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in interfacejava.nio.channels.ReadableByteChannel
- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
write
in interfacejava.nio.channels.WritableByteChannel
- Throws:
java.io.IOException
-
shutdownInput
public void shutdownInput() throws java.io.IOException
- Throws:
java.io.IOException
-
shutdownOutput
public void shutdownOutput() throws java.io.IOException
- Throws:
java.io.IOException
-
-