StringTokenizer st = new StringTokenizer(received,"\n");  if(!st.hasMoreTokens())
try
	public void run()	{		try		{			for(;;)			{				DatagramPacket packet = new DatagramPacket(buf,buf.length);				socket.receive(packet);				String host = packet.getAddress().getHostName();				Log.log(Log.MESSAGE,this,"Got UDP packet from " + host + ":");				String received = new String(buf,0,packet.getLength(),"UTF8");				Log.log(Log.DEBUG,this,received);				StringTokenizer st = new StringTokenizer(received,"\n");				if(!st.hasMoreTokens())				{					Log.log(Log.ERROR,this,"Received empty packet"						+ " from " + host);					Log.log(Log.ERROR,this,"Stopping server to"						+ " prevent further attacks");					stopServer();					return;				}				String key = st.nextToken();				if(!key.equals(authKey))				{					Log.log(Log.ERROR,this,"Received incorrect"						+ " authorization key " + key						+ " from " + host);					Log.log(Log.ERROR,this,"Stopping server to"						+ " prevent further attacks");					stopServer();					return;				}				Log.log(Log.DEBUG,this,host + ": authenticated"					+ " successfully");				// send ACK packet to let the client know				// that we picked it up				packet = new DatagramPacket(new byte[0],0,					packet.getAddress(),packet.getPort());				socket.send(packet);				handleClient(host,st);			}		}		catch(Exception e)		{			Log.log(Log.ERROR,this,e);			stopServer();		}	}