Converts teh array to string.

@param dashArray the dash array.
@return the converted string.
346544
public static String getDashString( float[] dashArray ) {
        StringBuilder sb = null;
        for( float f : dashArray ) {
            if (sb == null) {
                sb = new StringBuilder(String.valueOf(f));
            } else {
                sb.append(",");
                sb.append(String.valueOf(f));
            }
        }
        return sb.toString();
    }
1231976
public static List<String> reverse(final String[] array) {
        
        ArgUtils.notNull(array, "array");
        if(array.length == 0) {
            return new ArrayList<String>();
        }
        
        final List<String> list = Arrays.asList(array);
        Collections.sort(list, new Comparator<String>() {
            
            @Override
            public int compare(final String str1, final String str2) {
                
                int len1 = str1.length();
                int len2 = str2.length();
                
                if(len1 != len2) {
                    // 逆順
                    return Integer.compare(len1, len2) * -1;
                } else {
                    // 逆順
                    return str1.compareTo(str2) * 1;
                }
            }
        });
        
        return list;
    }
1272528
public static String encodeByteArray(byte[] byteArray) {
		try {
			return new String(Base64.encodeBase64(byteArray), UTF8_ENCODING);
		} catch(UnsupportedEncodingException e) {
			throw new MappingException("Could not encode byteArray to UTF8 encoding", e);
		}
	}
82278
private String _serializeArray(Array array, Set<Object> done) throws ConverterException {
	return _serializeList(array.toList(), done);
    }
121163
@NotNull
    public static String[] toArray(@Nullable final String stringArray, @NotNull final String delimiter) {
        if (StringUtils.isEmpty(stringArray)) {
            return new String[0];
        }
        final String regex = "(?<!\\\\)" + Pattern.quote(delimiter);
        return stringArray.split(regex);
    }
61994
public static <T, J extends Convertable<T>> T[] convertToArray(J[] array) {
        return toArray(convert(array));
    }
111085
public static byte[] removeNullBytes(byte[] array) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream(array.length);
		for (byte b : array) {
			if (b != 0x00) {
				baos.write(b);
			}
		}
		return baos.toByteArray();
	}
729158
public static int[] toJavaIntArray(ColumnarArray array) {
    for (int i = 0; i < array.numElements(); i++) {
      if (array.isNullAt(i)) {
        throw new RuntimeException("Cannot handle NULL values.");
      }
    }
    return array.toIntArray();
  }
515078
public static String[][] invert(final String[][] array) {
        final String[][] newarray = new String[array.length][2];
        for(int i = 0; i<array.length; i++) {
            newarray[i][0] = array[i][1];
            newarray[i][1] = array[i][0];
        }
        return newarray;
    }
397294
public static String arrayToString(Object[] array) {
		if (array == null)
			DialectException.throwEX("StrUtils arrayToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : array)
			sb.append("" + object + ",");
		if (sb.length() > 0)
			sb.setLength(sb.length() - 1);
		return sb.toString();
	}

	/**
	 * Change a Object array to connected string by given seperateString
	 */
	public static String arrayToString(Object[] array, String seperateString) {
		if (array == null)
			DialectException.throwEX("StrUtils arrayToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : array)
			sb.append("" + object + seperateString);
		if (sb.length() > 0)
			sb.setLength(sb.length() - seperateString.length());
		return sb.toString();
	}

	/**
	 * Change a Object List to "obj1,obj2...,objn" String
	 */
	public static String listToString(List<?> lst) {
		if (lst == null)
			DialectException.throwEX("StrUtils listToString() method do not accept null parameter");
		StringBuilder sb = new StringBuilder();
		for (Object object : lst)
			sb.append("" + object + ",");
		if (sb.length() > 0)
			sb.setLength(sb.length() - 1);
		return sb.toString();
	}

	/**
	 * Join 2 String array into one
	 */
	public static String[] joinStringArray(String[] array1, String[] array2) {
		List<String> l = new ArrayList<String>();
		for (String string : array1)
			l.add(string);
		for (String string : array2)
			l.add(string);
		return l.toArray(new String[l.size()]);
	}
499989
private function fromArrayToXmlString(array $array)
    {
        $string = '';

        foreach ($array as $key => $value) {
            $string .= '<' . $key . '>' .
                ((is_array($value))
                    ? $this->fromArrayToXmlString($value)
                    : $value) .
                '</' . $key . '>';
        }

        return $string;
    }
697348
public static String[] toStringArray(ArrayList<String> src) {
    String[] ret = new String[src.size()];
    return src.toArray(ret);
  }
1306185
public static String arrayToDelimitedString(Object[] arr, String delim) {
        if (Objects.isEmpty(arr)) {
            return "";
        }
        if (arr.length == 1) {
            return Objects.nullSafeToString(arr[0]);
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < arr.length; i++) {
            if (i > 0) {
                sb.append(delim);
            }
            sb.append(arr[i]);
        }
        return sb.toString();
    }
666708
public static String[] toStringArrayTrim(Array array) throws PageException {
	String[] arr = new String[array.size()];
	for (int i = 0; i < arr.length; i++) {
	    arr[i] = Caster.toString(array.get(i + 1, "")).trim();
	}

	return arr;
    }
763629
private String _serializeArray(Array array, Map<Object, String> done, String id) throws ConverterException {
	return _serializeList(array.toList(), done, id);
    }
686092
public static <T extends Number> int[] asArray(final T... array) {
        int[] b = new int[array.length];
        for (int i = 0; i < b.length; i++) {
            b[i] = array[i].intValue();
        }
        return b;
    }
55782
private static String[] appendToStringArray(String[] array, String element) {
		if (array != null) {
			String[] newArray = new String[array.length + 1];
			for (int i = 0; i < array.length; i++) {
				newArray[i] = array[i];
			}
			newArray[array.length] = element;
			return newArray;
		} else {
			return new String[] { element };
		}
	}