Android URL Decode parserTrackURL(String trackURL)

Here you can find the source of parserTrackURL(String trackURL)

Description

parser Track URL

Declaration

public static List<String> parserTrackURL(String trackURL)
        throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;

import java.util.List;
import java.util.StringTokenizer;
import org.apache.http.protocol.HTTP;

public class Main {

    public static List<String> parserTrackURL(String trackURL)
            throws UnsupportedEncodingException {
        List<String> list = new ArrayList<String>();
        StringTokenizer st = new StringTokenizer(trackURL, "&");
        while (st.hasMoreTokens()) {
            String url = st.nextToken();
            int index = url.indexOf("=");
            if (index > 0) {
                list.add(URLDecoder.decode(
                        url.substring(index + 1, url.length()), HTTP.UTF_8));
            }//w ww . j ava  2s .  c o  m
        }
        return list;
    }
}

Related

  1. decodeUrlFormEncoded(String data)
  2. parseForHTTP(String str)
  3. parseLastfmUrl(String url)
  4. parseUrl(String url)
  5. parseUrl(String url)