public int[] getCode(int ch){
		HuffNode current = theNodes[ch];
		if(current == null)
			return null;
		String v = "";
		
		HuffNode par = current.parent;
		while(par != null){
			if(par.left == current)
				v = "0" + v;
			else
				v = "1" + v;
			current = current.parent;
			par = current.parent;
		}
		
		int[] result = new int[v.length()];
		for(int i = 0; i < result.length; i++)
			result[i] = v.charAt(i) == '0' ? 0 : 1;
		
		return result;
	}