List of utility methods to do Array to String Convert
String | toString(byte[] ba) to String return toString(ba, 0, ba.length);
|
String | toString(byte[] ba, int offset, int length) to String char[] buf = new char[length * 2]; for (int i = 0, j = 0, k; i < length;) { k = ba[offset + i++]; buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F]; buf[j++] = HEX_DIGITS[k & 0x0F]; return new String(buf); |
String | byteToString(byte[] str) byte To String StringBuilder sb = new StringBuilder(); for (int i = 0; i < str.length; i++) { sb.append(StringUtil.toHexString(str[i])); sb.append(" "); return sb.toString(); |
String | toString(byte[] buffer) Method convert byte[] to String if (null == buffer) return null; else return new String(buffer); |
String | toString(final byte[] bytes) to String if (bytes == null) { return null; try { return new String(bytes, CHARSET_NAME_UTF8); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e.getMessage(), e); |
String | toString(final byte[] bytes, String charset) to String if (bytes == null) { return null; try { return new String(bytes, charset); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e.getMessage(), e); |
String | toStringArrayToString(String[] array) to String Array To String Collection<String> c = new Vector<String>(); for (int i = 0; i < array.length; i++) { c.add(array[i]); return c.toString(); |
String | ArraysToString(String[] arrays) Arrays To String String result = ""; if (arrays != null && arrays.length > 0) { for (String value : arrays) { result += value + ","; result = result.substring(0, result.length() - 1); return result; ... |
String | ArrayToString(Object[] ary) Array To String if (ary == null) { return null; StringBuilder sb = new StringBuilder(); sb.append("{"); for (int i = 0; i < ary.length; ++i) { sb.append(ary[i].toString()); sb.append(","); ... |
String | stringArrayToString(String[] array) string Array To String return arrayToString(array);
|