示例#1
0
 public void a(JsonWriter paramJsonWriter, Map<K, V> paramMap) throws IOException {
   int m = 0;
   int k = 0;
   if (paramMap == null) {
     paramJsonWriter.nullValue();
     return;
   }
   if (!f.a(a)) {
     paramJsonWriter.beginObject();
     paramMap = paramMap.entrySet().iterator();
     while (paramMap.hasNext()) {
       localObject = (Map.Entry) paramMap.next();
       paramJsonWriter.name(String.valueOf(((Map.Entry) localObject).getKey()));
       c.a(paramJsonWriter, ((Map.Entry) localObject).getValue());
     }
     paramJsonWriter.endObject();
     return;
   }
   Object localObject = new ArrayList(paramMap.size());
   ArrayList localArrayList = new ArrayList(paramMap.size());
   paramMap = paramMap.entrySet().iterator();
   int i = 0;
   if (paramMap.hasNext()) {
     Map.Entry localEntry = (Map.Entry) paramMap.next();
     com.google.gson.k localk = b.a(localEntry.getKey());
     ((List) localObject).add(localk);
     localArrayList.add(localEntry.getValue());
     if ((localk.g()) || (localk.h())) {}
     for (int j = 1; ; j = 0) {
       i = j | i;
       break;
     }
   }
   if (i != 0) {
     paramJsonWriter.beginArray();
     i = k;
     while (i < ((List) localObject).size()) {
       paramJsonWriter.beginArray();
       g.a((com.google.gson.k) ((List) localObject).get(i), paramJsonWriter);
       c.a(paramJsonWriter, localArrayList.get(i));
       paramJsonWriter.endArray();
       i += 1;
     }
     paramJsonWriter.endArray();
     return;
   }
   paramJsonWriter.beginObject();
   i = m;
   while (i < ((List) localObject).size()) {
     paramJsonWriter.name(a((com.google.gson.k) ((List) localObject).get(i)));
     c.a(paramJsonWriter, localArrayList.get(i));
     i += 1;
   }
   paramJsonWriter.endObject();
 }
示例#2
0
  public void a(d d1, Map map) {
    boolean flag3 = false;
    boolean flag2 = false;
    if (map == null) {
      d1.f();
      return;
    }
    if (!com.google.a.b.a.l.a(a)) {
      d1.d();
      java.util.Map.Entry entry;
      for (map = map.entrySet().iterator(); map.hasNext(); c.a(d1, entry.getValue())) {
        entry = (java.util.Map.Entry) map.next();
        d1.a(String.valueOf(entry.getKey()));
      }

      d1.e();
      return;
    }
    ArrayList arraylist = new ArrayList(map.size());
    ArrayList arraylist1 = new ArrayList(map.size());
    map = map.entrySet().iterator();
    boolean flag = false;
    while (map.hasNext()) {
      java.util.Map.Entry entry1 = (java.util.Map.Entry) map.next();
      t t1 = b.a(entry1.getKey());
      arraylist.add(t1);
      arraylist1.add(entry1.getValue());
      boolean flag1;
      if (t1.h() || t1.i()) {
        flag1 = true;
      } else {
        flag1 = false;
      }
      flag = flag1 | flag;
    }
    if (flag) {
      d1.b();
      for (int i = ((flag2) ? 1 : 0); i < arraylist.size(); i++) {
        d1.b();
        ag.a((t) arraylist.get(i), d1);
        c.a(d1, arraylist1.get(i));
        d1.c();
      }

      d1.c();
      return;
    }
    d1.d();
    for (int j = ((flag3) ? 1 : 0); j < arraylist.size(); j++) {
      d1.a(a((t) arraylist.get(j)));
      c.a(d1, arraylist1.get(j));
    }

    d1.e();
  }
示例#3
0
    static String v(Map map)
    {
        ArrayList arraylist = new ArrayList(map.size());
        java.util.Map.Entry entry;
        for (map = map.entrySet().iterator(); map.hasNext(); arraylist.add((new StringBuilder()).append(y.encode((String)entry.getKey())).append("=").append(y.encode((String)entry.getValue())).toString()))
        {
            entry = (java.util.Map.Entry)map.next();
        }

        return TextUtils.join("&", arraylist);
    }
示例#4
0
 static Map<String, String> z(Map<String, String> paramMap) {
   HashMap localHashMap = new HashMap();
   paramMap = paramMap.entrySet().iterator();
   while (paramMap.hasNext()) {
     Map.Entry localEntry = (Map.Entry) paramMap.next();
     if ((((String) localEntry.getKey()).startsWith("&")) && (localEntry.getValue() != null)) {
       String str = ((String) localEntry.getKey()).substring(1);
       if (!TextUtils.isEmpty(str)) {
         localHashMap.put(str, localEntry.getValue());
       }
     }
   }
   return localHashMap;
 }
示例#5
0
 private static String zzz(Map<String, String> paramMap) {
   StringBuilder localStringBuilder = new StringBuilder();
   paramMap = paramMap.entrySet().iterator();
   while (paramMap.hasNext()) {
     Map.Entry localEntry = (Map.Entry) paramMap.next();
     if (localStringBuilder.length() != 0) {
       localStringBuilder.append(", ");
     }
     localStringBuilder.append((String) localEntry.getKey());
     localStringBuilder.append("=");
     localStringBuilder.append((String) localEntry.getValue());
   }
   return localStringBuilder.toString();
 }
示例#6
0
  public HttpResponse a(q q1, Map map) {
    String s = q1.c();
    HashMap hashmap = new HashMap();
    hashmap.putAll(q1.h());
    hashmap.putAll(map);
    if (a != null) {
      String s1 = a.a(s);
      map = s1;
      if (s1 == null) {
        throw new IOException(
            (new StringBuilder()).append("URL blocked by rewriter: ").append(s).toString());
      }
    } else {
      map = s;
    }
    map = a(new URL(map), q1);
    String s2;
    for (Iterator iterator = hashmap.keySet().iterator();
        iterator.hasNext();
        map.addRequestProperty(s2, (String) hashmap.get(s2))) {
      s2 = (String) iterator.next();
    }

    a(((HttpURLConnection) (map)), q1);
    q1 = new ProtocolVersion("HTTP", 1, 1);
    if (map.getResponseCode() == -1) {
      throw new IOException("Could not retrieve response code from HttpUrlConnection.");
    }
    q1 =
        new BasicHttpResponse(
            new BasicStatusLine(q1, map.getResponseCode(), map.getResponseMessage()));
    q1.setEntity(a(((HttpURLConnection) (map))));
    map = map.getHeaderFields().entrySet().iterator();
    do {
      if (!map.hasNext()) {
        break;
      }
      java.util.Map.Entry entry = (java.util.Map.Entry) map.next();
      if (entry.getKey() != null) {
        q1.addHeader(
            new BasicHeader((String) entry.getKey(), (String) ((List) entry.getValue()).get(0)));
      }
    } while (true);
    return q1;
  }