util-commons/src/main/java/com/kwok/util/commons/StringUtils.java
/**
	 * Given an array of bytes it will convert the bytes to a hex string
	 * representation of the bytes.
	 *
	 * @param bytes
	 *        the bytes to convert in a hex string
	 * @param start
	 *        start index, inclusively
	 * @param end
	 *        end index, exclusively
	 * @return hex string representation of the byte array
	 */
Given an array of bytes it will convert the bytes to a hex string
representation of the bytes.

@param bytes
the bytes to convert in a hex string
@param start
start index, inclusively
@param end
end index, exclusively
@return hex string representation of the byte array
Given an array of bytes it will convert the bytes to a hex string representation of the bytes . @param bytes the bytes to convert in a hex string @param start start index inclusively @param end end index exclusively @return hex string representation of the byte array
public static String byteToHexString(final byte[] bytes, final int start, final int end) {
		if (bytes == null) {
			throw new IllegalArgumentException("bytes == null");
		}
		int length = end - start;
		char[] out = new char[length * 2];
		for (int i = start, j = 0; i < end; i++) {
			out[j++] = HEX_CHARS[(0xF0 & bytes[i]) >>> 4];
			out[j++] = HEX_CHARS[0x0F & bytes[i]];
		}
		return new String(out);
	}
public static String byteToHexString ( final byte [ ] bytes , final int start , final int end ) { if ( bytes == null ) { throw new IllegalArgumentException ( "bytes == null" ) ; } int length = end - start ; char [ ] out = new char [ length * 2 ] ; for ( int i = start , j = 0 ; i < end ; i ++ ) { out [ j ++ ] = HEX_CHARS [ ( 0xF0 & bytes [ i ] ) >>> 4 ] ; out [ j ++ ] = HEX_CHARS [ 0x0F & bytes [ i ] ] ; } return new String ( out ) ; }
Given an array of bytes it will convert the bytes to a hex string
 representation of the bytes.
Given an array of bytes it will convert the bytes to a hex string representation of the bytes .