zzw.java 21.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
package com.google.android.gms.internal;

import android.os.SystemClock;
import java.io.BufferedOutputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class zzw
  implements zzb
{
  private final Map<String, a> a = new LinkedHashMap(16, 0.75F, true);
  private long b = 0L;
  private final File c;
  private final int d;
  
  public zzw(File paramFile)
  {
    this(paramFile, 5242880);
  }
  
  public zzw(File paramFile, int paramInt)
  {
    this.c = paramFile;
    this.d = paramInt;
  }
  
  static int a(InputStream paramInputStream)
    throws IOException
  {
    return e(paramInputStream) << 0 | 0x0 | e(paramInputStream) << 8 | e(paramInputStream) << 16 | e(paramInputStream) << 24;
  }
  
  private static String a(String paramString)
  {
    int i = paramString.length() / 2;
    int j = paramString.substring(0, i).hashCode();
    return String.valueOf(j) + String.valueOf(paramString.substring(i).hashCode());
  }
  
  static void a(OutputStream paramOutputStream, int paramInt)
    throws IOException
  {
    paramOutputStream.write(paramInt >> 0 & 0xFF);
    paramOutputStream.write(paramInt >> 8 & 0xFF);
    paramOutputStream.write(paramInt >> 16 & 0xFF);
    paramOutputStream.write(paramInt >> 24 & 0xFF);
  }
  
  static void a(OutputStream paramOutputStream, long paramLong)
    throws IOException
  {
    paramOutputStream.write((byte)(int)(paramLong >>> 0));
    paramOutputStream.write((byte)(int)(paramLong >>> 8));
    paramOutputStream.write((byte)(int)(paramLong >>> 16));
    paramOutputStream.write((byte)(int)(paramLong >>> 24));
    paramOutputStream.write((byte)(int)(paramLong >>> 32));
    paramOutputStream.write((byte)(int)(paramLong >>> 40));
    paramOutputStream.write((byte)(int)(paramLong >>> 48));
    paramOutputStream.write((byte)(int)(paramLong >>> 56));
  }
  
  static void a(OutputStream paramOutputStream, String paramString)
    throws IOException
  {
    paramString = paramString.getBytes("UTF-8");
    a(paramOutputStream, paramString.length);
    paramOutputStream.write(paramString, 0, paramString.length);
  }
  
  private void a(String paramString, a parama)
  {
    if (!this.a.containsKey(paramString)) {}
    a locala;
    long l;
    for (this.b += parama.a;; this.b = (parama.a - locala.a + l))
    {
      this.a.put(paramString, parama);
      return;
      locala = (a)this.a.get(paramString);
      l = this.b;
    }
  }
  
  static void a(Map<String, String> paramMap, OutputStream paramOutputStream)
    throws IOException
  {
    if (paramMap != null)
    {
      a(paramOutputStream, paramMap.size());
      paramMap = paramMap.entrySet().iterator();
      while (paramMap.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)paramMap.next();
        a(paramOutputStream, (String)localEntry.getKey());
        a(paramOutputStream, (String)localEntry.getValue());
      }
    }
    a(paramOutputStream, 0);
  }
  
  private static byte[] a(InputStream paramInputStream, int paramInt)
    throws IOException
  {
    byte[] arrayOfByte = new byte[paramInt];
    int i = 0;
    while (i < paramInt)
    {
      int j = paramInputStream.read(arrayOfByte, i, paramInt - i);
      if (j == -1) {
        break;
      }
      i += j;
    }
    if (i != paramInt) {
      throw new IOException("Expected " + paramInt + " bytes, read " + i + " bytes");
    }
    return arrayOfByte;
  }
  
  static long b(InputStream paramInputStream)
    throws IOException
  {
    return 0L | (e(paramInputStream) & 0xFF) << 0 | (e(paramInputStream) & 0xFF) << 8 | (e(paramInputStream) & 0xFF) << 16 | (e(paramInputStream) & 0xFF) << 24 | (e(paramInputStream) & 0xFF) << 32 | (e(paramInputStream) & 0xFF) << 40 | (e(paramInputStream) & 0xFF) << 48 | (e(paramInputStream) & 0xFF) << 56;
  }
  
  static String c(InputStream paramInputStream)
    throws IOException
  {
    return new String(a(paramInputStream, (int)b(paramInputStream)), "UTF-8");
  }
  
  static Map<String, String> d(InputStream paramInputStream)
    throws IOException
  {
    int j = a(paramInputStream);
    if (j == 0) {}
    for (Object localObject = Collections.emptyMap();; localObject = new HashMap(j))
    {
      int i = 0;
      while (i < j)
      {
        ((Map)localObject).put(c(paramInputStream).intern(), c(paramInputStream).intern());
        i += 1;
      }
    }
    return (Map<String, String>)localObject;
  }
  
  private static int e(InputStream paramInputStream)
    throws IOException
  {
    int i = paramInputStream.read();
    if (i == -1) {
      throw new EOFException();
    }
    return i;
  }
  
  /* Error */
  public void initialize()
  {
    // Byte code:
    //   0: aload_0
    //   1: monitorenter
    //   2: aload_0
    //   3: getfield 41	com/google/android/gms/internal/zzw:c	Ljava/io/File;
    //   6: invokevirtual 217	java/io/File:exists	()Z
    //   9: ifne +35 -> 44
    //   12: aload_0
    //   13: getfield 41	com/google/android/gms/internal/zzw:c	Ljava/io/File;
    //   16: invokevirtual 220	java/io/File:mkdirs	()Z
    //   19: ifne +22 -> 41
    //   22: ldc -34
    //   24: iconst_1
    //   25: anewarray 4	java/lang/Object
    //   28: dup
    //   29: iconst_0
    //   30: aload_0
    //   31: getfield 41	com/google/android/gms/internal/zzw:c	Ljava/io/File;
    //   34: invokevirtual 225	java/io/File:getAbsolutePath	()Ljava/lang/String;
    //   37: aastore
    //   38: invokestatic 231	com/google/android/gms/internal/zzt:zzc	(Ljava/lang/String;[Ljava/lang/Object;)V
    //   41: aload_0
    //   42: monitorexit
    //   43: return
    //   44: aload_0
    //   45: getfield 41	com/google/android/gms/internal/zzw:c	Ljava/io/File;
    //   48: invokevirtual 235	java/io/File:listFiles	()[Ljava/io/File;
    //   51: astore 5
    //   53: aload 5
    //   55: ifnull -14 -> 41
    //   58: aload 5
    //   60: arraylength
    //   61: istore_2
    //   62: iconst_0
    //   63: istore_1
    //   64: iload_1
    //   65: iload_2
    //   66: if_icmpge -25 -> 41
    //   69: aload 5
    //   71: iload_1
    //   72: aaload
    //   73: astore 6
    //   75: aconst_null
    //   76: astore_3
    //   77: new 237	java/io/BufferedInputStream
    //   80: dup
    //   81: new 239	java/io/FileInputStream
    //   84: dup
    //   85: aload 6
    //   87: invokespecial 241	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   90: invokespecial 244	java/io/BufferedInputStream:<init>	(Ljava/io/InputStream;)V
    //   93: astore 4
    //   95: aload 4
    //   97: astore_3
    //   98: aload 4
    //   100: invokestatic 247	com/google/android/gms/internal/zzw$a:a	(Ljava/io/InputStream;)Lcom/google/android/gms/internal/zzw$a;
    //   103: astore 7
    //   105: aload 4
    //   107: astore_3
    //   108: aload 7
    //   110: aload 6
    //   112: invokevirtual 250	java/io/File:length	()J
    //   115: putfield 110	com/google/android/gms/internal/zzw$a:a	J
    //   118: aload 4
    //   120: astore_3
    //   121: aload_0
    //   122: aload 7
    //   124: getfield 253	com/google/android/gms/internal/zzw$a:b	Ljava/lang/String;
    //   127: aload 7
    //   129: invokespecial 255	com/google/android/gms/internal/zzw:a	(Ljava/lang/String;Lcom/google/android/gms/internal/zzw$a;)V
    //   132: aload 4
    //   134: invokevirtual 258	java/io/BufferedInputStream:close	()V
    //   137: iload_1
    //   138: iconst_1
    //   139: iadd
    //   140: istore_1
    //   141: goto -77 -> 64
    //   144: astore_3
    //   145: aconst_null
    //   146: astore 4
    //   148: aload 6
    //   150: ifnull +12 -> 162
    //   153: aload 4
    //   155: astore_3
    //   156: aload 6
    //   158: invokevirtual 261	java/io/File:delete	()Z
    //   161: pop
    //   162: aload 4
    //   164: ifnull -27 -> 137
    //   167: aload 4
    //   169: invokevirtual 258	java/io/BufferedInputStream:close	()V
    //   172: goto -35 -> 137
    //   175: astore_3
    //   176: goto -39 -> 137
    //   179: astore 5
    //   181: aload_3
    //   182: astore 4
    //   184: aload 5
    //   186: astore_3
    //   187: aload 4
    //   189: ifnull +8 -> 197
    //   192: aload 4
    //   194: invokevirtual 258	java/io/BufferedInputStream:close	()V
    //   197: aload_3
    //   198: athrow
    //   199: astore_3
    //   200: aload_0
    //   201: monitorexit
    //   202: aload_3
    //   203: athrow
    //   204: astore_3
    //   205: goto -68 -> 137
    //   208: astore 4
    //   210: goto -13 -> 197
    //   213: astore 5
    //   215: aload_3
    //   216: astore 4
    //   218: aload 5
    //   220: astore_3
    //   221: goto -34 -> 187
    //   224: astore_3
    //   225: goto -77 -> 148
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	228	0	this	zzw
    //   63	78	1	i	int
    //   61	6	2	j	int
    //   76	45	3	localObject1	Object
    //   144	1	3	localIOException1	IOException
    //   155	1	3	localObject2	Object
    //   175	7	3	localIOException2	IOException
    //   186	12	3	localObject3	Object
    //   199	4	3	localObject4	Object
    //   204	12	3	localIOException3	IOException
    //   220	1	3	localObject5	Object
    //   224	1	3	localIOException4	IOException
    //   93	100	4	localObject6	Object
    //   208	1	4	localIOException5	IOException
    //   216	1	4	localIOException6	IOException
    //   51	19	5	arrayOfFile	File[]
    //   179	6	5	localObject7	Object
    //   213	6	5	localObject8	Object
    //   73	84	6	localFile	File
    //   103	25	7	locala	a
    // Exception table:
    //   from	to	target	type
    //   77	95	144	java/io/IOException
    //   167	172	175	java/io/IOException
    //   77	95	179	finally
    //   2	41	199	finally
    //   44	53	199	finally
    //   58	62	199	finally
    //   132	137	199	finally
    //   167	172	199	finally
    //   192	197	199	finally
    //   197	199	199	finally
    //   132	137	204	java/io/IOException
    //   192	197	208	java/io/IOException
    //   98	105	213	finally
    //   108	118	213	finally
    //   121	132	213	finally
    //   156	162	213	finally
    //   98	105	224	java/io/IOException
    //   108	118	224	java/io/IOException
    //   121	132	224	java/io/IOException
  }
  
  public void remove(String paramString)
  {
    try
    {
      boolean bool = zzf(paramString).delete();
      a locala = (a)this.a.get(paramString);
      if (locala != null)
      {
        this.b -= locala.a;
        this.a.remove(paramString);
      }
      if (!bool) {
        zzt.zzb("Could not delete cache entry for key=%s, filename=%s", new Object[] { paramString, a(paramString) });
      }
      return;
    }
    finally {}
  }
  
  /* Error */
  public zzb.zza zza(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: monitorenter
    //   2: aload_0
    //   3: getfield 37	com/google/android/gms/internal/zzw:a	Ljava/util/Map;
    //   6: aload_1
    //   7: invokeinterface 118 2 0
    //   12: checkcast 8	com/google/android/gms/internal/zzw$a
    //   15: astore 5
    //   17: aload 5
    //   19: ifnonnull +9 -> 28
    //   22: aconst_null
    //   23: astore_1
    //   24: aload_0
    //   25: monitorexit
    //   26: aload_1
    //   27: areturn
    //   28: aload_0
    //   29: aload_1
    //   30: invokevirtual 266	com/google/android/gms/internal/zzw:zzf	(Ljava/lang/String;)Ljava/io/File;
    //   33: astore 4
    //   35: new 11	com/google/android/gms/internal/zzw$b
    //   38: dup
    //   39: new 237	java/io/BufferedInputStream
    //   42: dup
    //   43: new 239	java/io/FileInputStream
    //   46: dup
    //   47: aload 4
    //   49: invokespecial 241	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   52: invokespecial 244	java/io/BufferedInputStream:<init>	(Ljava/io/InputStream;)V
    //   55: iconst_0
    //   56: invokespecial 280	com/google/android/gms/internal/zzw$b:<init>	(Ljava/io/InputStream;B)V
    //   59: astore_2
    //   60: aload_2
    //   61: invokestatic 247	com/google/android/gms/internal/zzw$a:a	(Ljava/io/InputStream;)Lcom/google/android/gms/internal/zzw$a;
    //   64: pop
    //   65: aload_2
    //   66: aload 4
    //   68: invokevirtual 250	java/io/File:length	()J
    //   71: aload_2
    //   72: invokestatic 283	com/google/android/gms/internal/zzw$b:a	(Lcom/google/android/gms/internal/zzw$b;)I
    //   75: i2l
    //   76: lsub
    //   77: l2i
    //   78: invokestatic 184	com/google/android/gms/internal/zzw:a	(Ljava/io/InputStream;I)[B
    //   81: astore 6
    //   83: new 285	com/google/android/gms/internal/zzb$zza
    //   86: dup
    //   87: invokespecial 286	com/google/android/gms/internal/zzb$zza:<init>	()V
    //   90: astore_3
    //   91: aload_3
    //   92: aload 6
    //   94: putfield 290	com/google/android/gms/internal/zzb$zza:data	[B
    //   97: aload_3
    //   98: aload 5
    //   100: getfield 292	com/google/android/gms/internal/zzw$a:c	Ljava/lang/String;
    //   103: putfield 294	com/google/android/gms/internal/zzb$zza:zza	Ljava/lang/String;
    //   106: aload_3
    //   107: aload 5
    //   109: getfield 296	com/google/android/gms/internal/zzw$a:d	J
    //   112: putfield 298	com/google/android/gms/internal/zzb$zza:zzb	J
    //   115: aload_3
    //   116: aload 5
    //   118: getfield 300	com/google/android/gms/internal/zzw$a:e	J
    //   121: putfield 302	com/google/android/gms/internal/zzb$zza:zzc	J
    //   124: aload_3
    //   125: aload 5
    //   127: getfield 305	com/google/android/gms/internal/zzw$a:f	J
    //   130: putfield 308	com/google/android/gms/internal/zzb$zza:zzd	J
    //   133: aload_3
    //   134: aload 5
    //   136: getfield 311	com/google/android/gms/internal/zzw$a:g	J
    //   139: putfield 314	com/google/android/gms/internal/zzb$zza:zze	J
    //   142: aload_3
    //   143: aload 5
    //   145: getfield 317	com/google/android/gms/internal/zzw$a:h	Ljava/util/Map;
    //   148: putfield 319	com/google/android/gms/internal/zzb$zza:zzf	Ljava/util/Map;
    //   151: aload_2
    //   152: invokevirtual 320	com/google/android/gms/internal/zzw$b:close	()V
    //   155: aload_3
    //   156: astore_1
    //   157: goto -133 -> 24
    //   160: astore_1
    //   161: aconst_null
    //   162: astore_1
    //   163: goto -139 -> 24
    //   166: astore_3
    //   167: aconst_null
    //   168: astore_2
    //   169: ldc_w 322
    //   172: iconst_2
    //   173: anewarray 4	java/lang/Object
    //   176: dup
    //   177: iconst_0
    //   178: aload 4
    //   180: invokevirtual 225	java/io/File:getAbsolutePath	()Ljava/lang/String;
    //   183: aastore
    //   184: dup
    //   185: iconst_1
    //   186: aload_3
    //   187: invokevirtual 323	java/io/IOException:toString	()Ljava/lang/String;
    //   190: aastore
    //   191: invokestatic 275	com/google/android/gms/internal/zzt:zzb	(Ljava/lang/String;[Ljava/lang/Object;)V
    //   194: aload_0
    //   195: aload_1
    //   196: invokevirtual 325	com/google/android/gms/internal/zzw:remove	(Ljava/lang/String;)V
    //   199: aload_2
    //   200: ifnull +7 -> 207
    //   203: aload_2
    //   204: invokevirtual 320	com/google/android/gms/internal/zzw$b:close	()V
    //   207: aconst_null
    //   208: astore_1
    //   209: goto -185 -> 24
    //   212: astore_1
    //   213: aconst_null
    //   214: astore_1
    //   215: goto -191 -> 24
    //   218: astore_1
    //   219: aconst_null
    //   220: astore_2
    //   221: aload_2
    //   222: ifnull +7 -> 229
    //   225: aload_2
    //   226: invokevirtual 320	com/google/android/gms/internal/zzw$b:close	()V
    //   229: aload_1
    //   230: athrow
    //   231: astore_1
    //   232: aload_0
    //   233: monitorexit
    //   234: aload_1
    //   235: athrow
    //   236: astore_1
    //   237: aconst_null
    //   238: astore_1
    //   239: goto -215 -> 24
    //   242: astore_1
    //   243: goto -22 -> 221
    //   246: astore_1
    //   247: goto -26 -> 221
    //   250: astore_3
    //   251: goto -82 -> 169
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	254	0	this	zzw
    //   0	254	1	paramString	String
    //   59	167	2	localb	b
    //   90	66	3	localzza	zzb.zza
    //   166	21	3	localIOException1	IOException
    //   250	1	3	localIOException2	IOException
    //   33	146	4	localFile	File
    //   15	129	5	locala	a
    //   81	12	6	arrayOfByte	byte[]
    // Exception table:
    //   from	to	target	type
    //   151	155	160	java/io/IOException
    //   35	60	166	java/io/IOException
    //   203	207	212	java/io/IOException
    //   35	60	218	finally
    //   2	17	231	finally
    //   28	35	231	finally
    //   151	155	231	finally
    //   203	207	231	finally
    //   225	229	231	finally
    //   229	231	231	finally
    //   225	229	236	java/io/IOException
    //   60	151	242	finally
    //   169	199	246	finally
    //   60	151	250	java/io/IOException
  }
  
  public void zza(String paramString, zzb.zza paramzza)
  {
    int i = 0;
    label355:
    label379:
    label382:
    for (;;)
    {
      Object localObject2;
      a locala;
      try
      {
        int j = paramzza.data.length;
        if (this.b + j >= this.d)
        {
          if (zzt.DEBUG) {
            zzt.zza("Pruning old cache entries.", new Object[0]);
          }
          long l1 = this.b;
          long l2 = SystemClock.elapsedRealtime();
          localObject1 = this.a.entrySet().iterator();
          if (!((Iterator)localObject1).hasNext()) {
            break label382;
          }
          localObject2 = (a)((Map.Entry)((Iterator)localObject1).next()).getValue();
          if (!zzf(((a)localObject2).b).delete()) {
            continue;
          }
          this.b -= ((a)localObject2).a;
          ((Iterator)localObject1).remove();
          i += 1;
          if ((float)(this.b + j) >= this.d * 0.9F) {
            break label379;
          }
          if (zzt.DEBUG) {
            zzt.zza("pruned %d files, %d bytes, %d ms", new Object[] { Integer.valueOf(i), Long.valueOf(this.b - l1), Long.valueOf(SystemClock.elapsedRealtime() - l2) });
          }
        }
        Object localObject1 = zzf(paramString);
        try
        {
          localObject2 = new BufferedOutputStream(new FileOutputStream((File)localObject1));
          locala = new a(paramString, paramzza);
          if (locala.a((OutputStream)localObject2)) {
            break label355;
          }
          ((BufferedOutputStream)localObject2).close();
          zzt.zzb("Failed to write header for %s", new Object[] { ((File)localObject1).getAbsolutePath() });
          throw new IOException();
        }
        catch (IOException paramString)
        {
          if (!((File)localObject1).delete()) {
            zzt.zzb("Could not clean up file %s", new Object[] { ((File)localObject1).getAbsolutePath() });
          }
        }
        return;
        zzt.zzb("Could not delete cache entry for key=%s, filename=%s", new Object[] { ((a)localObject2).b, a(((a)localObject2).b) });
        continue;
        ((BufferedOutputStream)localObject2).write(paramzza.data);
      }
      finally {}
      ((BufferedOutputStream)localObject2).close();
      a(paramString, locala);
      continue;
    }
  }
  
  public File zzf(String paramString)
  {
    return new File(this.c, a(paramString));
  }
  
  static final class a
  {
    public long a;
    public String b;
    public String c;
    public long d;
    public long e;
    public long f;
    public long g;
    public Map<String, String> h;
    
    private a() {}
    
    public a(String paramString, zzb.zza paramzza)
    {
      this.b = paramString;
      this.a = paramzza.data.length;
      this.c = paramzza.zza;
      this.d = paramzza.zzb;
      this.e = paramzza.zzc;
      this.f = paramzza.zzd;
      this.g = paramzza.zze;
      this.h = paramzza.zzf;
    }
    
    public static a a(InputStream paramInputStream)
      throws IOException
    {
      a locala = new a();
      if (zzw.a(paramInputStream) != 538247942) {
        throw new IOException();
      }
      locala.b = zzw.c(paramInputStream);
      locala.c = zzw.c(paramInputStream);
      if (locala.c.equals("")) {
        locala.c = null;
      }
      locala.d = zzw.b(paramInputStream);
      locala.e = zzw.b(paramInputStream);
      locala.f = zzw.b(paramInputStream);
      locala.g = zzw.b(paramInputStream);
      locala.h = zzw.d(paramInputStream);
      return locala;
    }
    
    public final boolean a(OutputStream paramOutputStream)
    {
      try
      {
        zzw.a(paramOutputStream, 538247942);
        zzw.a(paramOutputStream, this.b);
        if (this.c == null) {}
        for (String str = "";; str = this.c)
        {
          zzw.a(paramOutputStream, str);
          zzw.a(paramOutputStream, this.d);
          zzw.a(paramOutputStream, this.e);
          zzw.a(paramOutputStream, this.f);
          zzw.a(paramOutputStream, this.g);
          zzw.a(this.h, paramOutputStream);
          paramOutputStream.flush();
          return true;
        }
        return false;
      }
      catch (IOException paramOutputStream)
      {
        zzt.zzb("%s", new Object[] { paramOutputStream.toString() });
      }
    }
  }
  
  static final class b
    extends FilterInputStream
  {
    private int a = 0;
    
    private b(InputStream paramInputStream)
    {
      super();
    }
    
    public final int read()
      throws IOException
    {
      int i = super.read();
      if (i != -1) {
        this.a += 1;
      }
      return i;
    }
    
    public final int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
      throws IOException
    {
      paramInt1 = super.read(paramArrayOfByte, paramInt1, paramInt2);
      if (paramInt1 != -1) {
        this.a += paramInt1;
      }
      return paramInt1;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gms/internal/zzw.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */