123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- .class public final Lokio/Pipe;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokio/Pipe$PipeSource;,
- Lokio/Pipe$PipeSink;
- }
- .end annotation
- # instance fields
- .field final buffer:Lokio/Buffer;
- .field final maxBufferSize:J
- .field private final sink:Lokio/Sink;
- .field sinkClosed:Z
- .field private final source:Lokio/Source;
- .field sourceClosed:Z
- # direct methods
- .method public constructor <init>(J)V
- .locals 3
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- iput-object v0, p0, Lokio/Pipe;->buffer:Lokio/Buffer;
- new-instance v0, Lokio/Pipe$PipeSink;
- invoke-direct {v0, p0}, Lokio/Pipe$PipeSink;-><init>(Lokio/Pipe;)V
- iput-object v0, p0, Lokio/Pipe;->sink:Lokio/Sink;
- new-instance v0, Lokio/Pipe$PipeSource;
- invoke-direct {v0, p0}, Lokio/Pipe$PipeSource;-><init>(Lokio/Pipe;)V
- iput-object v0, p0, Lokio/Pipe;->source:Lokio/Source;
- const-wide/16 v0, 0x1
- cmp-long v2, p1, v0
- if-ltz v2, :cond_0
- iput-wide p1, p0, Lokio/Pipe;->maxBufferSize:J
- return-void
- :cond_0
- new-instance v0, Ljava/lang/IllegalArgumentException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "maxBufferSize < 1: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- # virtual methods
- .method public sink()Lokio/Sink;
- .locals 1
- iget-object v0, p0, Lokio/Pipe;->sink:Lokio/Sink;
- return-object v0
- .end method
- .method public source()Lokio/Source;
- .locals 1
- iget-object v0, p0, Lokio/Pipe;->source:Lokio/Source;
- return-object v0
- .end method
|