Here you can find the source of fromBytes(byte abyte0[])
public static String fromBytes(byte abyte0[])
//package com.java2s; public class Main { public static String fromBytes(byte abyte0[]) { StringBuffer stringbuffer = new StringBuffer(""); int i = 0; do {//from ww w . j a v a 2 s . co m int j = abyte0.length; if (i < j) { int k = abyte0[i]; if (k < 0) k += 256; StringBuffer stringbuffer1; if (k < 16) stringbuffer1 = stringbuffer.append("0"); String s = Integer.toHexString(k); StringBuffer stringbuffer2 = stringbuffer.append(s); i++; } else { return stringbuffer.toString(); } } while (true); } }