nd4j-common/src/main/java/org/nd4j/util/StringUtils.java
public static String byteToHexString(byte[] bytes, int start, int end) {
        if (bytes == null) {
            throw new IllegalArgumentException("bytes == null");
        }
        StringBuilder s = new StringBuilder();
        for(int i = start; i < end; i++) {
            s.append(format("%02x", bytes[i]));
        }
        return s.toString();
    }
public static String byteToHexString(byte[] bytes, int start, int end) {
        if (bytes == null) {
            throw new IllegalArgumentException("bytes == null");
        }
        StringBuilder s = new StringBuilder();
        for(int i = start; i < end; i++) {
            s.append(format("%02x", bytes[i]));
        }
        return s.toString();
    }
Given an array of bytes it will convert the bytes to a hex string
representation of the bytes
@param bytes
@param start start index, inclusively
@param end end index, exclusively
@return hex string representation of the byte array