103 |
* @param offset The offset into the buffer to start writing. |
* @param offset The offset into the buffer to start writing. |
104 |
* @param length The maximum number of bytes to read. |
* @param length The maximum number of bytes to read. |
105 |
* |
* |
106 |
* @since Java 1.2 |
* @since 1.2 |
107 |
*/ |
*/ |
108 |
public DatagramPacket(byte[] buf, int offset, int length) |
public DatagramPacket(byte[] buf, int offset, int length) |
109 |
{ |
{ |
146 |
* @param addr The address to send to |
* @param addr The address to send to |
147 |
* @param port The port to send to |
* @param port The port to send to |
148 |
* |
* |
149 |
* @since Java 1.2 |
* @since 1.2 |
150 |
*/ |
*/ |
151 |
public DatagramPacket(byte[] buf, int offset, int length, |
public DatagramPacket(byte[] buf, int offset, int length, |
152 |
InetAddress address, int port) |
InetAddress address, int port) |
230 |
* |
* |
231 |
* @return The buffer offset. |
* @return The buffer offset. |
232 |
* |
* |
233 |
* @since Java 1.2 |
* @since 1.2 |
234 |
*/ |
*/ |
235 |
public synchronized int getOffset() |
public synchronized int getOffset() |
236 |
{ |
{ |
251 |
* This sets the address to which the data packet will be transmitted. |
* This sets the address to which the data packet will be transmitted. |
252 |
* |
* |
253 |
* @param addr The destination address |
* @param addr The destination address |
254 |
|
* |
255 |
|
* @since 1.1 |
256 |
*/ |
*/ |
257 |
public synchronized void setAddress(InetAddress iaddr) |
public synchronized void setAddress(InetAddress iaddr) |
258 |
{ |
{ |
266 |
* This sets the port to which the data packet will be transmitted. |
* This sets the port to which the data packet will be transmitted. |
267 |
* |
* |
268 |
* @param port The destination port |
* @param port The destination port |
269 |
|
* |
270 |
|
* @since 1.1 |
271 |
*/ |
*/ |
272 |
public synchronized void setPort(int iport) |
public synchronized void setPort(int iport) |
273 |
{ |
{ |
281 |
* Sets the data buffer for this packet. |
* Sets the data buffer for this packet. |
282 |
* |
* |
283 |
* @param buf The new buffer for this packet |
* @param buf The new buffer for this packet |
284 |
|
* |
285 |
|
* @since 1.1 |
286 |
*/ |
*/ |
287 |
public synchronized void setData(byte[] buf) |
public synchronized void setData(byte[] buf) |
288 |
{ |
{ |
301 |
* @param offset The offset into the buffer to start reading data from. |
* @param offset The offset into the buffer to start reading data from. |
302 |
* @param length The number of bytes of data in the buffer. |
* @param length The number of bytes of data in the buffer. |
303 |
* |
* |
304 |
* @since Java 1.2 |
* @since 1.2 |
305 |
*/ |
*/ |
306 |
public synchronized void setData(byte[] buf, int offset, int length) |
public synchronized void setData(byte[] buf, int offset, int length) |
307 |
{ |
{ |
326 |
* Sets the length of the data in the buffer. |
* Sets the length of the data in the buffer. |
327 |
* |
* |
328 |
* @param length The new length. (Where len <= buf.length) |
* @param length The new length. (Where len <= buf.length) |
329 |
|
* |
330 |
|
* @since 1.1 |
331 |
*/ |
*/ |
332 |
public synchronized void setLength(int length) |
public synchronized void setLength(int length) |
333 |
{ |
{ |