/** Return all bytes of a given array in Utf8 representation * as an array of characters. * @param src The array holding the bytes. */ public static char[] utf2chars(byte[] src) { return utf2chars(src, 0, src.length); }
/** Return all bytes of a given array in Utf8 representation * as an array of characters. * @param src The array holding the bytes. */ public static char[] utf2chars(byte[] src) { return utf2chars(src, 0, src.length); }
/** Return all bytes of a given array in Utf8 representation * as an array of characters. * @param src The array holding the bytes. */ public static char[] utf2chars(byte[] src) { return utf2chars(src, 0, src.length); }
/** Return all bytes of a given array in Utf8 representation * as an array of characters. * @param src The array holding the bytes. */ public static char[] utf2chars(byte[] src) { return utf2chars(src, 0, src.length); }
/** Return bytes in Utf8 representation as an array of characters. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static char[] utf2chars(byte[] src, int sindex, int len) { char[] dst = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); char[] result = new char[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; }
/** Return bytes in Utf8 representation as a string. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); }
/** Return bytes in Utf8 representation as an array of characters. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static char[] utf2chars(byte[] src, int sindex, int len) { char[] dst = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); char[] result = new char[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; }
/** Return bytes in Utf8 representation as an array of characters. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static char[] utf2chars(byte[] src, int sindex, int len) { char[] dst = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); char[] result = new char[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; }
/** Return bytes in Utf8 representation as an array of characters. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static char[] utf2chars(byte[] src, int sindex, int len) { char[] dst = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); char[] result = new char[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; }
/** Return bytes in Utf8 representation as a string. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); }
/** Return bytes in Utf8 representation as a string. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); }
/** Return bytes in Utf8 representation as a string. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); }
public static void encodeClassName (TypeElement te, final StringBuilder sb, final char separator) { Name name = ((Symbol.ClassSymbol)te).flatname; assert name != null; final int nameLength = name.getByteLength(); final char[] nameChars = new char[nameLength]; int charLength = Convert.utf2chars(name.getByteArray(), name.getByteOffset(), nameChars, 0, nameLength); if (separator != '.') { //NOI18N for (int i=0; i<charLength; i++) { if (nameChars[i] == '.') { //NOI18N nameChars[i] = separator; } } } sb.append(nameChars,0,charLength); }