static public BigInteger bytesToBigInteger ( byte [ ] buffer , int index ) { int length = bytesToInt ( buffer , index ) ; // pull out the length of the big integer index += 4 ; byte [ ] bytes = new byte [ length ] ; System . arraycopy ( buffer , index , bytes , 0 , length ) ; // pull out the bytes for the big integer return new BigInteger ( bytes ) ; }
This function converts the bytes in a byte array at the specified index to its corresponding big integer value .