Java tutorial
//package com.java2s; public class Main { public static String encodeByte(byte[] strbyte, String destEncoding) { String ret = null; try { ret = new String(strbyte, destEncoding); } catch (Exception e) { ret = "byte to " + destEncoding + " error. str=[" + strbyte + "]"; } return (ret); } }