ForwardingSink.smali 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. .class public abstract Lokio/ForwardingSink;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # interfaces
  5. .implements Lokio/Sink;
  6. # instance fields
  7. .field private final delegate:Lokio/Sink;
  8. # direct methods
  9. .method public constructor <init>(Lokio/Sink;)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/ForwardingSink;->delegate:Lokio/Sink;
  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/ForwardingSink;->delegate:Lokio/Sink;
  30. invoke-interface {v0}, Lokio/Sink;->close()V
  31. return-void
  32. .end method
  33. .method public final delegate()Lokio/Sink;
  34. .locals 1
  35. iget-object v0, p0, Lokio/ForwardingSink;->delegate:Lokio/Sink;
  36. return-object v0
  37. .end method
  38. .method public flush()V
  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/ForwardingSink;->delegate:Lokio/Sink;
  46. invoke-interface {v0}, Lokio/Sink;->flush()V
  47. return-void
  48. .end method
  49. .method public timeout()Lokio/Timeout;
  50. .locals 1
  51. iget-object v0, p0, Lokio/ForwardingSink;->delegate:Lokio/Sink;
  52. invoke-interface {v0}, Lokio/Sink;->timeout()Lokio/Timeout;
  53. move-result-object v0
  54. return-object v0
  55. .end method
  56. .method public toString()Ljava/lang/String;
  57. .locals 2
  58. new-instance v0, Ljava/lang/StringBuilder;
  59. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  60. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  61. move-result-object v1
  62. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  63. move-result-object v1
  64. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  65. const-string v1, "("
  66. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  67. iget-object v1, p0, Lokio/ForwardingSink;->delegate:Lokio/Sink;
  68. invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
  69. move-result-object v1
  70. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  71. const-string v1, ")"
  72. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  73. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  74. move-result-object v0
  75. return-object v0
  76. .end method
  77. .method public write(Lokio/Buffer;J)V
  78. .locals 1
  79. .annotation system Ldalvik/annotation/Throws;
  80. value = {
  81. Ljava/io/IOException;
  82. }
  83. .end annotation
  84. iget-object v0, p0, Lokio/ForwardingSink;->delegate:Lokio/Sink;
  85. invoke-interface {v0, p1, p2, p3}, Lokio/Sink;->write(Lokio/Buffer;J)V
  86. return-void
  87. .end method