List of utility methods to do Object Array to String
String[] | convertObjectArrayToStringArray(Object[] array) convert Object Array To String Array String[] newArray = new String[array.length]; for (int i = 0; i < newArray.length; i++) { newArray[i] = String.valueOf(array[i]); return newArray; |
String[] | convertObjectArrayToStringArray(Object[] objectArray) convert Object Array To String Array String[] stringArray = new String[objectArray.length]; int i = 0; for (Object o : objectArray) { stringArray[i] = o.toString(); i++; return stringArray; |
String | convertObjectToString(Object obj) Converts Object to String. return obj == null ? null : obj.toString();
|
String | convertObjectToString(Object obj) Converts the provided object to String
if (obj == null) return ""; String s = ""; if (obj instanceof byte[]) { byte[] bArray = (byte[]) obj; for (int i = 0; i < bArray.length; i++) s += bArray[i] + " "; return s; ... |
String | convertObjectToString(Object object) convert Object To String return object == null ? "-" : object.toString(); |
String | convertObjectToString(Object value) convert Object To String if (value != null) { return value.toString(); } else { return null; |
String | objectArrayToString(Object object) Type cast utility used to conserve data types within JDBC/HSQLDB. return (String) ((Object[]) object)[0];
|
String | objectArrayToString(Object[] arr) Utility to convert an Object[] to a String. if (arr == null) { return "null"; StringBuilder sb = new StringBuilder("["); for (int i = 0; i < arr.length; ++i) { if (i > 0) { sb.append(", "); sb.append(arr[i]); sb.append(']'); return sb.toString(); |
String | objectArrayToString(Object[] arr, String name) Convert an object array to a string, suitable for use in toString methods of the *Stat classes. if (arr == null) { return "null"; StringBuffer sb = new StringBuffer(); int len = arr.length; for (int i = 0; i < len; i++) { sb.append("\n " + name + "[" + i + "]:\n"); sb.append(" " + arr[i].toString()); ... |
String | objectArrayToString(Object[] objArray, String separator) Creates a string from an object array. StringBuilder buf = new StringBuilder(); if (objArray != null) { boolean addSeparator = false; for (Object obj : objArray) { if (addSeparator) { buf.append(separator); buf.append(obj.toString()); ... |