61 |
|
|
62 |
/** |
/** |
63 |
* Opens a datagram channel. |
* Opens a datagram channel. |
64 |
|
* |
65 |
|
* @exception IOException If an error occurs |
66 |
*/ |
*/ |
67 |
public static DatagramChannel open () throws IOException |
public static DatagramChannel open () throws IOException |
68 |
{ |
{ |
84 |
|
|
85 |
/** |
/** |
86 |
* Writes data to this channel. |
* Writes data to this channel. |
87 |
|
* |
88 |
|
* @exception IOException If an error occurs |
89 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
90 |
*/ |
*/ |
91 |
public final long write (ByteBuffer[] srcs) |
public final long write (ByteBuffer[] srcs) |
92 |
{ |
{ |
100 |
|
|
101 |
/** |
/** |
102 |
* Connects this channel's socket. |
* Connects this channel's socket. |
103 |
|
* |
104 |
|
* @exception IOException If an error occurs |
105 |
*/ |
*/ |
106 |
public abstract DatagramChannel connect (SocketAddress remote); |
public abstract DatagramChannel connect (SocketAddress remote); |
107 |
|
|
108 |
/** |
/** |
109 |
* Disonnects this channel's socket. |
* Disonnects this channel's socket. |
110 |
|
* |
111 |
|
* @exception IOException If an error occurs |
112 |
*/ |
*/ |
113 |
public abstract DatagramChannel disconnect (); |
public abstract DatagramChannel disconnect (); |
114 |
|
|
115 |
/** |
/** |
116 |
* Tells whether or not this channel's socket is connected. |
* Tells whether or not this channel's socket is connected. |
117 |
|
* |
118 |
|
* @exception IOException If an error occurs. |
119 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
120 |
*/ |
*/ |
121 |
public abstract boolean isConnected (); |
public abstract boolean isConnected (); |
122 |
|
|
127 |
|
|
128 |
/** |
/** |
129 |
* Reads data from this channel. |
* Reads data from this channel. |
130 |
|
* |
131 |
|
* @exception IOException If an error occurs. |
132 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
133 |
*/ |
*/ |
134 |
public abstract long read (ByteBuffer[] dsts, int offset, int length); |
public abstract long read (ByteBuffer[] dsts, int offset, int length); |
135 |
|
|
136 |
/** |
/** |
137 |
* Receives a datagram via this channel. |
* Receives a datagram via this channel. |
138 |
|
* |
139 |
|
* @exception IOException If an error occurs |
140 |
*/ |
*/ |
141 |
public abstract SocketAddress receive (ByteBuffer dst); |
public abstract SocketAddress receive (ByteBuffer dst); |
142 |
|
|
143 |
/** |
/** |
144 |
* Sends a datagram via this channel. |
* Sends a datagram via this channel. |
145 |
|
* |
146 |
|
* @exception IOException If an error occurs |
147 |
*/ |
*/ |
148 |
public abstract int send (ByteBuffer src, SocketAddress target); |
public abstract int send (ByteBuffer src, SocketAddress target); |
149 |
|
|
154 |
|
|
155 |
/** |
/** |
156 |
* Writes data to this channel. |
* Writes data to this channel. |
157 |
|
* |
158 |
|
* @exception IOException If an error occurs. |
159 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
160 |
*/ |
*/ |
161 |
public abstract int write (ByteBuffer src); |
public abstract int write (ByteBuffer src); |
162 |
|
|
163 |
/** |
/** |
164 |
* Writes data to this channel. |
* Writes data to this channel. |
165 |
|
* |
166 |
|
* @exception IOException If an error occurs. |
167 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
168 |
*/ |
*/ |
169 |
public abstract long write (ByteBuffer[] srcs, int offset, int length); |
public abstract long write (ByteBuffer[] srcs, int offset, int length); |
170 |
|
|
171 |
/** |
/** |
172 |
* Retrieves the valid operations for this channel. |
* Retrieves the valid operations for this channel. |
173 |
|
* |
174 |
|
* @exception IOException If an error occurs. |
175 |
|
* @exception NotYetConnectedException The channel's socket is not connected. |
176 |
*/ |
*/ |
177 |
public final int validOps () |
public final int validOps () |
178 |
{ |
{ |