decode Url : Url « Network « Android






decode Url

 
/*
 * Copyright 2010 Renren, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//package com.renren.api.connect.android;
import java.net.URLDecoder;

import android.os.Bundle;

class Util {
  public static Bundle decodeUrl(String s) {
    Bundle params = new Bundle();
    if (s != null) {
      params.putString("url", s);
      String array[] = s.split("&");
      for (String parameter : array) {
        String v[] = parameter.split("=");
        if (v.length > 1)
          params.putString(v[0], URLDecoder.decode(v[1]));
      }
    }
    return params;
  }
}

   
  








Related examples in the same category

1.Using Intent to open a URL
2.Process xml document from a Url
3.Suggest Url Provider
4.Showing android:autoLink property, which linkifies things like URLs and phone numbers found in the text.
5.extends ArrayAdapter to create URL history
6.Used to compress URL using the bit.ly service.
7.URL encode and decode
8.Is valid URL
9.Download from URLConnection
10.Request from an URL
11.Get Url From Img Tag
12.Returns the contents of the given URL as an array of strings
13.Read from a URL
14.Pull the raw text content of the given URL.
15.Get Video from URL
16.Gets data from URL
17.get Url Response
18.URL Encode Utils
19.Downloads a file given URL to specified destination
20.get Host From Url
21.encode Url
22.Convert a byte array to a URL encoded string
23.get Url content with max retries
24.get Url By Post
25.Take a base url and a {@link Map} of parameters to build a valid url