Here you can find the source of getUnicodeText(Object text)
public static String getUnicodeText(Object text) throws UnsupportedEncodingException
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String getUnicodeText(Object text) throws UnsupportedEncodingException { if (text == null) { return null; } else if (text instanceof byte[]) { return new String((byte[]) text, "UTF-8"); } else {/*from w ww. j a v a 2s .com*/ return String.valueOf(text); } } }