Java tutorial
//package com.java2s; public class Main { public static String encodeBytes(byte[] bytes) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < bytes.length; i++) { sb.append((char) (((bytes[i] >> 4) & 0xF) + ((int) 'a'))); sb.append((char) (((bytes[i]) & 0xF) + ((int) 'a'))); } return sb.toString(); } }