private static String join(final String[] args, final String delim) {
        if (args == null || args.length == 0) return "";

        final StringBuilder sb = new StringBuilder();
        for (final String s : args) sb.append(s + delim);
        sb.delete(sb.length() - delim.length(), sb.length());
        return sb.toString();
    }