/** * Get bytes from String with UTF8 encoding * @param name * input String * @return byte array */ public static byte[] getUTF8Bytes(String name) { try { return name.getBytes("UTF-8"); } catch (java.io.UnsupportedEncodingException e) { return getBytes(name); } }