public static String toHexString2(byte[] tab) {
		if (tab == null) return "null";
		
		StringBuffer buf = new StringBuffer();
		
		for (int i=0; i<tab.length; i++) {
			int value = tab[i] >= 0 ? tab[i] : 256+tab[i];
			if (value < 16) buf.append('0');
			buf.append(Integer.toHexString(value));
		}
		
		return buf.toString();
	}