public static String hex2string(String hex, String typeDesc) {

		String[] types = typeDesc.split("\\,");
		char[] hex2 = getHex(hex, getLen(types));

		int start = 0;
		StringBuilder builder = new StringBuilder();
		for (int i = 0; i < types.length; ++i) {
			if (types[i].trim().equals("int")) {
				builder.append(Integer.parseInt(
						new String(Arrays.copyOfRange(hex2, start, start + 8)),
						16));
				builder.append(",");
				start += 8;
			} else if (types[i].trim().equals("long")) {
				builder.append(Long.parseLong(
								new String(Arrays.copyOfRange(hex2, start,
										start + 16)), 16));
				builder.append(",");
				start += 16;
			} else if (types[i].trim().equals("byte")) {
				builder.append(Integer.parseInt(
						new String(Arrays.copyOfRange(hex2, start, start + 2)),
						16));
				builder.append(",");
				start += 2;
			}
		}
		return builder.toString();
	}