public class DatagramSocketIO extends SocketIOBase<java.nio.channels.DatagramChannel>
DEFAULT_BUFFER_SIZE
Constructor and Description |
---|
DatagramSocketIO(java.nio.channels.DatagramChannel socketChannel,
java.lang.String mode)
Construct a DatagramSocketIO for the given DatagramChannel.
|
Modifier and Type | Method and Description |
---|---|
int |
readinto(java.nio.ByteBuffer buf)
Read up to buf.remaining() bytes into buf.
|
long |
readinto(java.nio.ByteBuffer[] bufs)
Read bytes into each of the specified ByteBuffers via scatter
i/o.
|
int |
write(java.nio.ByteBuffer buf)
Write the given ByteBuffer to the IO stream.
|
long |
write(java.nio.ByteBuffer[] bufs)
Writes bytes from each of the specified ByteBuffers via gather
i/o.
|
close, getChannel, readable, writable
asInputStream, asOutputStream, checkClosed, checkReadable, checkWritable, closed, flush, isatty, seek, seek, tell, truncate
public DatagramSocketIO(java.nio.channels.DatagramChannel socketChannel, java.lang.String mode)
socketChannel
- a DatagramChannel to wrapmode
- a raw io socket mode Stringpublic int readinto(java.nio.ByteBuffer buf)
RawIOBase
public long readinto(java.nio.ByteBuffer[] bufs)
public int write(java.nio.ByteBuffer buf)
RawIOBase