| GNU Classpath (0.19) | ||
| Prev Class | Next Class | Frames | No Frames | |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr | |
public abstract class DatagramChannelextends AbstractSelectableChannelimplements ByteChannel, ScatteringByteChannel, GatheringByteChannelConstructor Summary | |
| |
Method Summary | |
DatagramChannel |
|
DatagramChannel |
|
boolean |
|
static DatagramChannel |
|
int |
|
long |
|
long |
|
SocketAddress |
|
int |
|
DatagramSocket |
|
int |
|
int |
|
long |
|
long |
|
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel | |
blockingLock, configureBlocking, implCloseChannel, implCloseSelectableChannel, implConfigureBlocking, isBlocking, isRegistered, keyFor, provider, register | |
Methods inherited from class java.nio.channels.SelectableChannel | |
blockingLock, configureBlocking, isBlocking, isRegistered, keyFor, provider, register, register, validOps | |
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel | |
begin, close, end, implCloseChannel, isOpen | |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | |
public DatagramChannel connect(SocketAddress remote) throws IOException
Connects this channel's socket.
- Throws:
IOException- If an error occurs.SecurityException- If a security manager has been installed and it does not permit datagrams to be sent to the given address.
public DatagramChannel disconnect() throws IOException
Disonnects this channel's socket.
- Throws:
IOException- If an error occurs
public boolean isConnected()
Tells whether or not this channel's socket is connected.
- Throws:
NotYetConnectedException- The channel's socket is not connected.
public static DatagramChannel open() throws IOException
Opens a datagram channel.
- Throws:
IOException- If an error occurs
public int read(ByteBuffer dst) throws IOException
Reads data from this channel.
- Specified by:
- read in interface ReadableByteChannel
public final long read(ByteBuffer[] dsts) throws IOException
Reads data from this channel.
- Specified by:
- read in interface ScatteringByteChannel
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException
Reads data from this channel.
- Specified by:
- read in interface ScatteringByteChannel
- Throws:
IOException- If an error occurs.NotYetConnectedException- The channel's socket is not connected.
public SocketAddress receive(ByteBuffer dst) throws IOException
Receives a datagram via this channel.
- Throws:
IOException- If an error occursSecurityException- If a security manager has been installed and it does not permit datagrams to be sent to the given address.
public int send(ByteBuffer src, SocketAddress target) throws IOException
Sends a datagram via this channel.
- Throws:
IOException- If an error occursSecurityException- If a security manager has been installed and it does not permit datagrams to be sent to the given address.
public final int validOps()
Retrieves the valid operations for this channel.
- Overrides:
- validOps in interface SelectableChannel
- Throws:
NotYetConnectedException- The channel's socket is not connected.
public int write(ByteBuffer src) throws IOException
Writes data to this channel.
- Specified by:
- write in interface WritableByteChannel
- Throws:
IOException- If an error occurs.NotYetConnectedException- The channel's socket is not connected.
public final long write(ByteBuffer[] srcs) throws IOException
Writes data to this channel.
- Specified by:
- write in interface GatheringByteChannel
- Throws:
IOException- If an error occursNotYetConnectedException- The channel's socket is not connected.
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException
Writes data to this channel.
- Specified by:
- write in interface GatheringByteChannel
- Throws:
IOException- If an error occurs.NotYetConnectedException- The channel's socket is not connected.
| GNU Classpath (0.19) |