code: public static int chatLinkToID(String chat_link) {
  		String striped;
  		byte[] decoded, id = new byte[4];
  		int i, j = 3;
  		boolean isFind = false;
  		if (chat_link == null || chat_link.equals("")) return CHAT_LINK_ERROR;
  
  		//strip Base64 string from chat link
  		Pattern pattern = Pattern.compile(FORMAT);
  		Matcher matcher = pattern.matcher(chat_link);
  		if (matcher.find()) striped = matcher.group(2);
  		else return CHAT_LINK_ERROR;
  
  		try {//decode the Base64 string
  			decoded = _decode(striped.getBytes());
  			if (decoded == null) return CHAT_LINK_ERROR;
  		} catch (IllegalArgumentException e) {
  			return CHAT_LINK_ERROR;
  		}
  
  		//see if the chat link is the one supported
  		for (i = 0; i < HEADER.length; i++) {
  			if (HEADER[i] == decoded[0]) {
  				isFind = true;
  				break;
  			}
  		}
  		if (!isFind) return CHAT_LINK_NOT_SUPPORTED_ERROR;
  
  		//extract id
  		for (i = (i == ITEM_INDEX) ? 2 : 1; i < decoded.length; i++) {
  			if (decoded[i] == TERMINAL || j < 0) break;
  			id[j--] = decoded[i];
  		}
  
  		return ByteBuffer.wrap(id).getInt();
  	}
docs: extract id from given chat link<br/>
  Currently supported chat link type:
  item, map, skill, trait, recipe, wardrobe, outfit
  
  @param chat_link chat link
  @return id |
  {@link GuildWars2Utility#CHAT_LINK_ERROR} if something is wrong with the given chat link |
  {@link GuildWars2Utility#CHAT_LINK_NOT_SUPPORTED_ERROR} if given chat link isn't supported