@SuppressWarnings("unchecked")
	public static <T> T[] toArray(String string, T[] a) {
		if (string.length() == 0) {
			return a;
		}
		String[] stringObjs = string.replace(";;", "\u1024").split(";");
		T[] r = a;
		if (stringObjs.length > r.length) {
			r = (T[]) Array.newInstance(a.getClass().getComponentType(),
					stringObjs.length);
		}
		for (int i = 0; i < stringObjs.length; i++) {
			stringObjs[i] = stringObjs[i].replace("\u1024", ";");
			if (a.getClass().getComponentType().isAssignableFrom(Integer.class)) {
				r[i] = (T) (Integer) Integer.parseInt(stringObjs[i]);
			} else if (a.getClass().getComponentType()
					.isAssignableFrom(Short.class)) {
				r[i] = (T) (Short) Short.parseShort(stringObjs[i]);
			} else if (a.getClass().getComponentType()
					.isAssignableFrom(Byte.class)) {
				r[i] = (T) (Byte) Byte.parseByte(stringObjs[i]);
			} else if (a.getClass().getComponentType()
					.isAssignableFrom(Double.class)) {
				r[i] = (T) (Double) Double.parseDouble(stringObjs[i]);
			} else if (a.getClass().getComponentType()
					.isAssignableFrom(String.class)) {
				r[i] = (T) stringObjs[i];
			} else {
				throw new UnsupportedOperationException(
						"Cannot convert type : "
								+ a.getClass().getComponentType().getName());
			}
		}
		return r;
	}