ForwardingSource.smali 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. .class public abstract Lokio/ForwardingSource;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # interfaces
  5. .implements Lokio/Source;
  6. # instance fields
  7. .field private final delegate:Lokio/Source;
  8. # direct methods
  9. .method public constructor <init>(Lokio/Source;)V
  10. .locals 1
  11. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  12. if-eqz p1, :cond_0
  13. iput-object p1, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  14. return-void
  15. :cond_0
  16. new-instance p1, Ljava/lang/IllegalArgumentException;
  17. const-string v0, "delegate == null"
  18. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  19. throw p1
  20. .end method
  21. # virtual methods
  22. .method public close()V
  23. .locals 1
  24. .annotation system Ldalvik/annotation/Throws;
  25. value = {
  26. Ljava/io/IOException;
  27. }
  28. .end annotation
  29. iget-object v0, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  30. invoke-interface {v0}, Lokio/Source;->close()V
  31. return-void
  32. .end method
  33. .method public final delegate()Lokio/Source;
  34. .locals 1
  35. iget-object v0, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  36. return-object v0
  37. .end method
  38. .method public read(Lokio/Buffer;J)J
  39. .locals 1
  40. .annotation system Ldalvik/annotation/Throws;
  41. value = {
  42. Ljava/io/IOException;
  43. }
  44. .end annotation
  45. iget-object v0, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  46. invoke-interface {v0, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
  47. move-result-wide p1
  48. return-wide p1
  49. .end method
  50. .method public timeout()Lokio/Timeout;
  51. .locals 1
  52. iget-object v0, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  53. invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
  54. move-result-object v0
  55. return-object v0
  56. .end method
  57. .method public toString()Ljava/lang/String;
  58. .locals 2
  59. new-instance v0, Ljava/lang/StringBuilder;
  60. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  61. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  62. move-result-object v1
  63. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  64. move-result-object v1
  65. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  66. const-string v1, "("
  67. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  68. iget-object v1, p0, Lokio/ForwardingSource;->delegate:Lokio/Source;
  69. invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
  70. move-result-object v1
  71. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  72. const-string v1, ")"
  73. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  74. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  75. move-result-object v0
  76. return-object v0
  77. .end method