public static String format(byte[] bytes, boolean uppercase) {
		if (bytes==null) return "";
		StringBuffer sb = new StringBuffer(bytes.length * 2);
		int b;
		for (int i=0; i < bytes.length; i++) {
			b=bytes[i] & 0xFF;
			sb.append(HEX[b >>> 4]);
			sb.append(HEX[b & 0x0F]);
		}
		return (uppercase ? sb.toString().toUpperCase() : sb.toString());
	}