public BEValue toBEValue() throws UnsupportedEncodingException {
		Map<String, BEValue> peer = new HashMap<String, BEValue>();
		if (this.hasPeerId()) {
			peer.put("peer id", new BEValue(this.getPeerId().array()));
		}
		peer.put("ip", new BEValue(this.getIp(), Torrent.BYTE_ENCODING));
		peer.put("port", new BEValue(this.getPort()));
		return new BEValue(peer);
	}