Support Tor on Android x86 (thanks to n8fr8).

This commit is contained in:
akwizgran
2015-04-16 08:02:57 +01:00
parent 92d26f7867
commit 6135bea2b4
12 changed files with 69 additions and 53 deletions

View File

@@ -1,6 +1,7 @@
package org.briarproject.util;
import java.io.UnsupportedEncodingException;
import java.util.Collection;
public class StringUtils {
@@ -13,6 +14,15 @@ public class StringUtils {
return s == null || s.length() == 0;
}
public static String join(Collection<String> strings, String separator) {
StringBuilder joined = new StringBuilder();
for(String s : strings) {
if(joined.length() > 0) joined.append(separator);
joined.append(s);
}
return joined.toString();
}
public static byte[] toUtf8(String s) {
try {
return s.getBytes("UTF-8");