scan nearby stations for Berlin

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@395 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2010-12-15 22:46:54 +00:00
parent 028008cc08
commit 4f18a77433
4 changed files with 147 additions and 11 deletions

View file

@ -27,6 +27,7 @@ import java.io.Writer;
import java.net.HttpURLConnection;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -360,6 +361,18 @@ public final class ParserUtils
}
}
public static String urlDecode(final String str, final String enc)
{
try
{
return URLDecoder.decode(str, enc);
}
catch (final UnsupportedEncodingException x)
{
throw new RuntimeException(x);
}
}
public static <T> T selectNotNull(final T... groups)
{
T selected = null;