/** Return the long value locations at posn in the hex decoded value */ public static long decodeLong(String hex,int posn) { byte[] data = decodeHex(hex); long ret = 0; for(int i=0; i<8; i++) { ret = (ret << 8) | (data[(posn++) % data.length] & 0xFFl); } ret = Math.abs(ret); return ret; }