Java tutorial
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String readUTF(byte[] data) { try { return new String(data, "UTF-8"); } catch (UnsupportedEncodingException ex) { } return ""; } }