public static String byteArrayToHexString(byte[] block,int offset,int length){
  StringBuffer buf=new StringBuffer();
  int len=block.length;
  length=length + offset;
  if ((len < length)) {
    length=len;
  }
  for (int i=0 + offset; i < length; i++) {
    byte2hex(block[i],buf);
    if (i < length - 1) {
      buf.append(':');
    }
  }
  return buf.toString();
}

public static String byteArrayToHexString ( byte [ ] block , int offset , int length ) { StringBuffer buf = new StringBuffer ( ) ; int len = block . length ; length = length + offset ; if ( ( len < length ) ) { length = len ; } for ( int i = 0 + offset ; i < length ; i ++ ) { byte2hex ( block [ i ] , buf ) ; if ( i < length - 1 ) { buf . append ( ':' ) ; } } return buf . toString ( ) ; }
description of the method
