sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength());
ByteBuffer buf = ByteBuffer.wrap(packet.getData(), packet.getOffset(), packet.getLength()); InetAddress remote = packet.getAddress(); int port = packet.getPort(); if (remote == null) throw new NullPointerException(); if (port <= 0) throw new SocketException("invalid port " + port); while (true) { try { channel.send(buf, new InetSocketAddress(remote, port)); break; } catch (InterruptedIOException ioe) {  } }
  protected void send(DatagramPacket packet) throws IOException  {    synchronized(SEND_LOCK)      {      sendto(packet.getAddress(), packet.getPort(), packet.getData(),              packet.getOffset(), packet.getLength());      }      }