DiskLruCache$Snapshot.smali 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .class public final Lokhttp3/internal/cache/DiskLruCache$Snapshot;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # interfaces
  5. .implements Ljava/io/Closeable;
  6. # annotations
  7. .annotation system Ldalvik/annotation/EnclosingClass;
  8. value = Lokhttp3/internal/cache/DiskLruCache;
  9. .end annotation
  10. .annotation system Ldalvik/annotation/InnerClass;
  11. accessFlags = 0x11
  12. name = "Snapshot"
  13. .end annotation
  14. # instance fields
  15. .field private final key:Ljava/lang/String;
  16. .field private final lengths:[J
  17. .field private final sequenceNumber:J
  18. .field private final sources:[Lokio/Source;
  19. .field final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
  20. # direct methods
  21. .method constructor <init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;J[Lokio/Source;[J)V
  22. .locals 0
  23. iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  24. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  25. iput-object p2, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
  26. iput-wide p3, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sequenceNumber:J
  27. iput-object p5, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
  28. iput-object p6, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->lengths:[J
  29. return-void
  30. .end method
  31. .method static synthetic access$000(Lokhttp3/internal/cache/DiskLruCache$Snapshot;)Ljava/lang/String;
  32. .locals 0
  33. iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
  34. return-object p0
  35. .end method
  36. # virtual methods
  37. .method public close()V
  38. .locals 4
  39. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
  40. array-length v1, v0
  41. const/4 v2, 0x0
  42. :goto_0
  43. if-ge v2, v1, :cond_0
  44. aget-object v3, v0, v2
  45. invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
  46. add-int/lit8 v2, v2, 0x1
  47. goto :goto_0
  48. :cond_0
  49. return-void
  50. .end method
  51. .method public edit()Lokhttp3/internal/cache/DiskLruCache$Editor;
  52. .locals 4
  53. .annotation system Ldalvik/annotation/Throws;
  54. value = {
  55. Ljava/io/IOException;
  56. }
  57. .end annotation
  58. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  59. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
  60. iget-wide v2, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sequenceNumber:J
  61. invoke-virtual {v0, v1, v2, v3}, Lokhttp3/internal/cache/DiskLruCache;->edit(Ljava/lang/String;J)Lokhttp3/internal/cache/DiskLruCache$Editor;
  62. move-result-object v0
  63. return-object v0
  64. .end method
  65. .method public getLength(I)J
  66. .locals 3
  67. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->lengths:[J
  68. aget-wide v1, v0, p1
  69. return-wide v1
  70. .end method
  71. .method public getSource(I)Lokio/Source;
  72. .locals 1
  73. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->sources:[Lokio/Source;
  74. aget-object p1, v0, p1
  75. return-object p1
  76. .end method
  77. .method public key()Ljava/lang/String;
  78. .locals 1
  79. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->key:Ljava/lang/String;
  80. return-object v0
  81. .end method