public static final String bytesToHex ( byte [ ] bs , int off , int length ) { if ( bs . length <= off || bs . length < off + length ) throw new IllegalArgumentException ( ) ; StringBuilder sb = new StringBuilder ( length * 2 ) ; bytesToHexAppend ( bs , off , length , sb ) ; return sb . toString ( ) ; }
Converts a byte array into a string of lower case hex chars .