Package jnr.unixsocket.impl
Class AbstractNativeDatagramChannel
- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.SelectableChannel
-
- java.nio.channels.spi.AbstractSelectableChannel
-
- java.nio.channels.DatagramChannel
-
- jnr.unixsocket.impl.AbstractNativeDatagramChannel
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.ByteChannel
,java.nio.channels.Channel
,java.nio.channels.GatheringByteChannel
,java.nio.channels.InterruptibleChannel
,java.nio.channels.MulticastChannel
,java.nio.channels.NetworkChannel
,java.nio.channels.ReadableByteChannel
,java.nio.channels.ScatteringByteChannel
,java.nio.channels.WritableByteChannel
,jnr.enxio.channels.NativeSelectableChannel
- Direct Known Subclasses:
UnixDatagramChannel
public abstract class AbstractNativeDatagramChannel extends java.nio.channels.DatagramChannel implements java.nio.channels.ByteChannel, jnr.enxio.channels.NativeSelectableChannel
-
-
Constructor Summary
Constructors Constructor Description AbstractNativeDatagramChannel(int fd)
-
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)
long
read(java.nio.ByteBuffer[] dsts, int offset, int length)
void
setFD(int fd)
int
write(java.nio.ByteBuffer src)
long
write(java.nio.ByteBuffer[] srcs, int offset, int length)
-
Methods inherited from class java.nio.channels.DatagramChannel
bind, connect, disconnect, getLocalAddress, getRemoteAddress, isConnected, open, open, read, receive, send, setOption, socket, validOps, write
-
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
-
setFD
public void setFD(int fd)
-
getFD
public final int getFD()
- Specified by:
getFD
in interfacejnr.enxio.channels.NativeSelectableChannel
-
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
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in interfacejava.nio.channels.ReadableByteChannel
- Specified by:
read
in classjava.nio.channels.DatagramChannel
- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException
- Specified by:
read
in interfacejava.nio.channels.ScatteringByteChannel
- Specified by:
read
in classjava.nio.channels.DatagramChannel
- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
write
in interfacejava.nio.channels.WritableByteChannel
- Specified by:
write
in classjava.nio.channels.DatagramChannel
- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
- Specified by:
write
in interfacejava.nio.channels.GatheringByteChannel
- Specified by:
write
in classjava.nio.channels.DatagramChannel
- Throws:
java.io.IOException
-
-