public static long uidToLong ( final byte [ ] uid , final short uid_length ) { if ( uid . length != uid_length ) { throw new IllegalArgumentException ( "UID was " + uid . length + " bytes long but expected to be " + uid_length ) ; } final byte [ ] uid_raw = new byte [ 8 ] ; System . arraycopy ( uid , 0 , uid_raw , 8 - uid_length , uid_length ) ; return Bytes . getLong ( uid_raw ) ; }
Converts a UID to an integer value . The array must be the same length as uid_length or an exception will be thrown .