public void parse(Parcel parcel){
	
		try{
			//Extract CRC and calculate CRC.
			parcel.rewind();
			long crc = parcel.getLong(parcel.capacity() - 8);
			parcel.add(parcel.capacity() - 8, (long)0);
			byte[] data = new byte[parcel.capacity()];		
			parcel.rewind();
			parcel.get(data, 0, parcel.capacity());
			CRC32 crc32Checker = new CRC32();
			crc32Checker.update(data);
			
			if(crc32Checker.getValue() != crc){
				throw new PacketException("CRC check for beacon packet did not pass.");
			}
			
		}catch(BufferUnderflowException ex){
			throw new PacketException("Packet is too short - cannot parse.");
		}
		
		
		super.parse(parcel);
		
		Parcel contents = getContents();
		
		if(contents == null){
			throw new PacketException("Malformed beacon packet. Missing contents.");
		}
		
		
		
		int numPeers = (int)contents.getShort();
		peers = Collections.synchronizedMap(new HashMap<PeerAddress, Peer>(numPeers));
		
		for(int i = 0; i < numPeers; i++){
			Peer peer = new Peer(contents);
			peers.put(peer.getAddress(), peer);
		}
		
		
		//ToDo: CRC Check.
		
	}