public void recievePacket(byte[] bytearray)
	{
		DataInputStream packetStream = new DataInputStream(new BufferedInputStream( new ByteArrayInputStream(bytearray)));
		try
		{
			int id = packetStream.readByte();
			switch (id)
			{
				case PING:
				{
					consoleMessage("recieved Ping");
					sendPong();
					break;
				}
				case IMAGE_LINK:
				{
					String ss = packetStream.readUTF();
					imageServer.addLink(ss);
					consoleMessage("recieved: " + ss);
					
					break;
				}
			}
			
		} catch (IOException e)
		{
			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
		}
	}