I have just written the following:
public static String toDelimitedString(int[] ids, String delimiter)
{
StringBuffer strb = new StringBuffer();
for (int id : ids)
{
strb.append(String.valueOf(id) + delimiter);
}
return strb.substring(0, strb.length() - delimiter.length());
}