/** * Convert a byte array to a String using UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToUtf8(final byte[] ba) { // UTF-8 should always be supported return bytesToEncoding(ba, "UTF8"); }
/** * Convert a byte array to a String using UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToUtf8(final byte[] ba) { // UTF-8 should always be supported return bytesToEncoding(ba, "UTF8"); }
/** * Convert a byte array to a String using UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToUtf8(final byte[] ba) { // UTF-8 should always be supported return bytesToEncoding(ba, "UTF8"); }
/** * Convert a byte array to a String using Latin-1 (aka ISO-8859-1) encoding. * * Note: something is probably wrong if you're using this method. Either * you're dealing with legacy code that doesn't support i18n or you're * using a third-party library that only deals with Latin-1. New code * should (almost) always uses UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToLatin1(final byte[] ba) { // ISO-8859-1 should always be supported return bytesToEncoding(ba, "ISO-8859-1"); }
/** * Convert a byte array to a String using Latin-1 (aka ISO-8859-1) encoding. * * Note: something is probably wrong if you're using this method. Either * you're dealing with legacy code that doesn't support i18n or you're * using a third-party library that only deals with Latin-1. New code * should (almost) always uses UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToLatin1(final byte[] ba) { // ISO-8859-1 should always be supported return bytesToEncoding(ba, "ISO-8859-1"); }
/** * Convert a byte array to a String using Latin-1 (aka ISO-8859-1) encoding. * * Note: something is probably wrong if you're using this method. Either * you're dealing with legacy code that doesn't support i18n or you're * using a third-party library that only deals with Latin-1. New code * should (almost) always uses UTF-8 encoding. * * @return the decoded String or null if ba is null */ public static String bytesToLatin1(final byte[] ba) { // ISO-8859-1 should always be supported return bytesToEncoding(ba, "ISO-8859-1"); }