diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-07-13 12:23:47 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-07-13 12:23:47 +0200 |
commit | ba2d2afbbc6cbb79fc75493703425b5d6d040530 (patch) | |
tree | e731a1209160e8224679cb238c0a964c3e757590 /src/de/podfetcher/util/URLChecker.java | |
parent | 1ae00a0f2531fdb05a44877dda88ee2300e3ffec (diff) | |
download | AntennaPod-ba2d2afbbc6cbb79fc75493703425b5d6d040530.zip |
Renamed package and application
Diffstat (limited to 'src/de/podfetcher/util/URLChecker.java')
-rw-r--r-- | src/de/podfetcher/util/URLChecker.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/de/podfetcher/util/URLChecker.java b/src/de/podfetcher/util/URLChecker.java deleted file mode 100644 index 7a5d65180..000000000 --- a/src/de/podfetcher/util/URLChecker.java +++ /dev/null @@ -1,39 +0,0 @@ -package de.podfetcher.util; - -import android.util.Log; - -/** Provides methods for checking and editing a URL.*/ -public final class URLChecker { - - /**Class shall not be instantiated.*/ - private URLChecker() { - } - - /**Logging tag.*/ - private static final String TAG = "URLChecker"; - /**Indicator for URLs made by Feedburner.*/ - private static final String FEEDBURNER_URL = "feeds.feedburner.com"; - /**Prefix that is appended to URLs by Feedburner.*/ - private static final String FEEDBURNER_PREFIX = "?format=xml"; - - /** Checks if URL is valid and modifies it if necessary. - * @param url The url which is going to be prepared - * @return The prepared url - * */ - public static String prepareURL(final String url) { - StringBuilder builder = new StringBuilder(); - - if (!url.startsWith("http")) { - builder.append("http://"); - Log.d(TAG, "Missing http; appending"); - } - builder.append(url); - - if (url.contains(FEEDBURNER_URL)) { - Log.d(TAG, - "URL seems to be Feedburner URL; appending prefix"); - builder.append(FEEDBURNER_PREFIX); - } - return builder.toString(); - } -} |