FramedStream.smali
.class public final Lcom/squareup/okhttp/internal/framed/FramedStream;
.super Ljava/lang/Object;
.source "FramedStream.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;,
Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;,
Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
}
.end annotation
# static fields
.field static final synthetic $assertionsDisabled:Z
# instance fields
.field bytesLeftInWriteWindow:J
.field private final connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
.field private errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
.field private final id:I
.field private final readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
.field private final requestHeaders:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;"
}
.end annotation
.end field
.field private responseHeaders:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;"
}
.end annotation
.end field
.field final sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
.field private final source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
.field unacknowledgedBytesRead:J
.field private final writeTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
# direct methods
.method static constructor <clinit>()V
.registers 0
return-void
.end method
.method constructor <init>(ILcom/squareup/okhttp/internal/framed/FramedConnection;ZZLjava/util/List;)V
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Lcom/squareup/okhttp/internal/framed/FramedConnection;",
"ZZ",
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, 0x0
.line 2
iput-wide v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->unacknowledgedBytesRead:J
.line 3
new-instance v0, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
invoke-direct {v0, p0}, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;-><init>(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
iput-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
.line 4
new-instance v0, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
invoke-direct {v0, p0}, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;-><init>(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
iput-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->writeTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
const/4 v0, 0x0
.line 5
iput-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
if-eqz p2, :cond_55
if-eqz p5, :cond_4d
.line 6
iput p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
.line 7
iput-object p2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
.line 8
iget-object p1, p2, Lcom/squareup/okhttp/internal/framed/FramedConnection;->peerSettings:Lcom/squareup/okhttp/internal/framed/Settings;
const/high16 v1, 0x10000
.line 9
invoke-virtual {p1, v1}, Lcom/squareup/okhttp/internal/framed/Settings;->getInitialWindowSize(I)I
move-result p1
int-to-long v2, p1
iput-wide v2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->bytesLeftInWriteWindow:J
.line 10
new-instance p1, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
iget-object p2, p2, Lcom/squareup/okhttp/internal/framed/FramedConnection;->okHttpSettings:Lcom/squareup/okhttp/internal/framed/Settings;
.line 11
invoke-virtual {p2, v1}, Lcom/squareup/okhttp/internal/framed/Settings;->getInitialWindowSize(I)I
move-result p2
int-to-long v1, p2
invoke-direct {p1, p0, v1, v2, v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;-><init>(Lcom/squareup/okhttp/internal/framed/FramedStream;JLcom/squareup/okhttp/internal/framed/FramedStream$1;)V
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
.line 12
new-instance p1, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
invoke-direct {p1, p0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;-><init>(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
.line 13
iget-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# setter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->finished:Z
invoke-static {p1, p4}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$102(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;Z)Z
.line 14
iget-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# setter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {p1, p3}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$202(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;Z)Z
.line 15
iput-object p5, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->requestHeaders:Ljava/util/List;
return-void
.line 16
:cond_4d
new-instance p1, Ljava/lang/NullPointerException;
const-string p2, "requestHeaders == null"
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p1
.line 17
:cond_55
new-instance p1, Ljava/lang/NullPointerException;
const-string p2, "connection == null"
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method static synthetic access$1000(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
.registers 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->cancelStreamIfNecessary()V
return-void
.end method
.method static synthetic access$1100(Lcom/squareup/okhttp/internal/framed/FramedStream;)Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->writeTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
return-object p0
.end method
.method static synthetic access$1200(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
.registers 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->checkOutNotClosed()V
return-void
.end method
.method static synthetic access$500(Lcom/squareup/okhttp/internal/framed/FramedStream;)Lcom/squareup/okhttp/internal/framed/FramedConnection;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
return-object p0
.end method
.method static synthetic access$600(Lcom/squareup/okhttp/internal/framed/FramedStream;)I
.registers 1
.line 1
iget p0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
return p0
.end method
.method static synthetic access$700(Lcom/squareup/okhttp/internal/framed/FramedStream;)Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
return-object p0
.end method
.method static synthetic access$800(Lcom/squareup/okhttp/internal/framed/FramedStream;)Lcom/squareup/okhttp/internal/framed/ErrorCode;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
return-object p0
.end method
.method static synthetic access$900(Lcom/squareup/okhttp/internal/framed/FramedStream;)V
.registers 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/InterruptedIOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->waitForIo()V
return-void
.end method
.method private cancelStreamIfNecessary()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$100(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;)Z
move-result v0
if-nez v0, :cond_23
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->closed:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$300(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;)Z
move-result v0
if-eqz v0, :cond_23
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$200(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-nez v0, :cond_21
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->closed:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$400(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-eqz v0, :cond_23
:cond_21
const/4 v0, 0x1
goto :goto_24
:cond_23
const/4 v0, 0x0
.line 3
:goto_24
invoke-virtual {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->isOpen()Z
move-result v1
.line 4
monitor-exit p0
:try_end_29
.catchall {:try_start_1 .. :try_end_29} :catchall_3b
if-eqz v0, :cond_31
.line 5
sget-object v0, Lcom/squareup/okhttp/internal/framed/ErrorCode;->CANCEL:Lcom/squareup/okhttp/internal/framed/ErrorCode;
invoke-virtual {p0, v0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->close(Lcom/squareup/okhttp/internal/framed/ErrorCode;)V
goto :goto_3a
:cond_31
if-nez v1, :cond_3a
.line 6
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {v0, v1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->removeStream(I)Lcom/squareup/okhttp/internal/framed/FramedStream;
:cond_3a
:goto_3a
return-void
:catchall_3b
move-exception v0
.line 7
:try_start_3c
monitor-exit p0
:try_end_3d
.catchall {:try_start_3c .. :try_end_3d} :catchall_3b
throw v0
.end method
.method private checkOutNotClosed()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->closed:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$400(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-nez v0, :cond_36
.line 2
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$200(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-nez v0, :cond_2e
.line 3
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
if-nez v0, :cond_15
return-void
.line 4
:cond_15
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "stream was reset: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 5
:cond_2e
new-instance v0, Ljava/io/IOException;
const-string v1, "stream finished"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 6
:cond_36
new-instance v0, Ljava/io/IOException;
const-string v1, "stream closed"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private closeInternal(Lcom/squareup/okhttp/internal/framed/ErrorCode;)Z
.registers 4
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
const/4 v1, 0x0
if-eqz v0, :cond_8
.line 3
monitor-exit p0
return v1
.line 4
:cond_8
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$100(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;)Z
move-result v0
if-eqz v0, :cond_1a
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$200(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-eqz v0, :cond_1a
.line 5
monitor-exit p0
return v1
.line 6
:cond_1a
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
.line 7
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 8
monitor-exit p0
:try_end_20
.catchall {:try_start_1 .. :try_end_20} :catchall_29
.line 9
iget-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {p1, v0}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->removeStream(I)Lcom/squareup/okhttp/internal/framed/FramedStream;
const/4 p1, 0x1
return p1
:catchall_29
move-exception p1
.line 10
:try_start_2a
monitor-exit p0
:try_end_2b
.catchall {:try_start_2a .. :try_end_2b} :catchall_29
throw p1
.end method
.method private waitForIo()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/InterruptedIOException;
}
.end annotation
.line 1
:try_start_0
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_3
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_3} :catch_4
return-void
.line 2
:catch_4
new-instance v0, Ljava/io/InterruptedIOException;
invoke-direct {v0}, Ljava/io/InterruptedIOException;-><init>()V
throw v0
.end method
# virtual methods
.method addBytesToWriteWindow(J)V
.registers 6
.line 1
iget-wide v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->bytesLeftInWriteWindow:J
add-long/2addr v0, p1
iput-wide v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->bytesLeftInWriteWindow:J
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-lez v2, :cond_e
.line 2
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:cond_e
return-void
.end method
.method public close(Lcom/squareup/okhttp/internal/framed/ErrorCode;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0, p1}, Lcom/squareup/okhttp/internal/framed/FramedStream;->closeInternal(Lcom/squareup/okhttp/internal/framed/ErrorCode;)Z
move-result v0
if-nez v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {v0, v1, p1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->writeSynReset(ILcom/squareup/okhttp/internal/framed/ErrorCode;)V
return-void
.end method
.method public closeLater(Lcom/squareup/okhttp/internal/framed/ErrorCode;)V
.registers 4
.line 1
invoke-direct {p0, p1}, Lcom/squareup/okhttp/internal/framed/FramedStream;->closeInternal(Lcom/squareup/okhttp/internal/framed/ErrorCode;)Z
move-result v0
if-nez v0, :cond_7
return-void
.line 2
:cond_7
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {v0, v1, p1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->writeSynResetLater(ILcom/squareup/okhttp/internal/framed/ErrorCode;)V
return-void
.end method
.method public getConnection()Lcom/squareup/okhttp/internal/framed/FramedConnection;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
return-object v0
.end method
.method public declared-synchronized getErrorCode()Lcom/squareup/okhttp/internal/framed/ErrorCode;
.registers 2
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_5
monitor-exit p0
return-object v0
:catchall_5
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getId()I
.registers 2
.line 1
iget v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
return v0
.end method
.method public getRequestHeaders()Ljava/util/List;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->requestHeaders:Ljava/util/List;
return-object v0
.end method
.method public declared-synchronized getResponseHeaders()Ljava/util/List;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_3f
.line 2
:goto_6
:try_start_6
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
if-nez v0, :cond_12
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
if-nez v0, :cond_12
.line 3
invoke-direct {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->waitForIo()V
:try_end_11
.catchall {:try_start_6 .. :try_end_11} :catchall_38
goto :goto_6
.line 4
:cond_12
:try_start_12
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
invoke-virtual {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;->exitAndThrowIfTimedOut()V
.line 5
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
if-eqz v0, :cond_1f
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
:try_end_1d
.catchall {:try_start_12 .. :try_end_1d} :catchall_3f
monitor-exit p0
return-object v0
.line 6
:cond_1f
:try_start_1f
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "stream was reset: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:catchall_38
move-exception v0
.line 7
iget-object v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
invoke-virtual {v1}, Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw v0
:try_end_3f
.catchall {:try_start_1f .. :try_end_3f} :catchall_3f
:catchall_3f
move-exception v0
monitor-exit p0
goto :goto_43
:goto_42
throw v0
:goto_43
goto :goto_42
.end method
.method public getSink()Lokio/Sink;
.registers 3
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
if-nez v0, :cond_14
invoke-virtual {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->isLocallyInitiated()Z
move-result v0
if-eqz v0, :cond_c
goto :goto_14
.line 3
:cond_c
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "reply before requesting the sink"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 4
:cond_14
:goto_14
monitor-exit p0
:try_end_15
.catchall {:try_start_1 .. :try_end_15} :catchall_18
.line 5
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
return-object v0
:catchall_18
move-exception v0
.line 6
:try_start_19
monitor-exit p0
:try_end_1a
.catchall {:try_start_19 .. :try_end_1a} :catchall_18
throw v0
.end method
.method public getSource()Lokio/Source;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
return-object v0
.end method
.method public isLocallyInitiated()Z
.registers 5
.line 1
iget v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
const/4 v1, 0x1
and-int/2addr v0, v1
const/4 v2, 0x0
if-ne v0, v1, :cond_9
const/4 v0, 0x1
goto :goto_a
:cond_9
const/4 v0, 0x0
.line 2
:goto_a
iget-object v3, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget-boolean v3, v3, Lcom/squareup/okhttp/internal/framed/FramedConnection;->client:Z
if-ne v3, v0, :cond_11
goto :goto_12
:cond_11
const/4 v1, 0x0
:goto_12
return v1
.end method
.method public declared-synchronized isOpen()Z
.registers 3
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_31
const/4 v1, 0x0
if-eqz v0, :cond_8
.line 2
monitor-exit p0
return v1
.line 3
:cond_8
:try_start_8
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$100(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;)Z
move-result v0
if-nez v0, :cond_18
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->closed:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$300(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;)Z
move-result v0
if-eqz v0, :cond_2e
:cond_18
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
.line 4
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$200(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-nez v0, :cond_28
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# getter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->closed:Z
invoke-static {v0}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$400(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;)Z
move-result v0
if-eqz v0, :cond_2e
:cond_28
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
:try_end_2a
.catchall {:try_start_8 .. :try_end_2a} :catchall_31
if-eqz v0, :cond_2e
.line 5
monitor-exit p0
return v1
:cond_2e
const/4 v0, 0x1
.line 6
monitor-exit p0
return v0
:catchall_31
move-exception v0
monitor-exit p0
throw v0
.end method
.method public readTimeout()Lokio/Timeout;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->readTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
return-object v0
.end method
.method receiveData(Lokio/BufferedSource;I)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
int-to-long v1, p2
invoke-virtual {v0, p1, v1, v2}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->receive(Lokio/BufferedSource;J)V
return-void
.end method
.method receiveFin()V
.registers 3
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->source:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;
const/4 v1, 0x1
# setter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->finished:Z
invoke-static {v0, v1}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;->access$102(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSource;Z)Z
.line 3
invoke-virtual {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->isOpen()Z
move-result v0
.line 4
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 5
monitor-exit p0
:try_end_f
.catchall {:try_start_1 .. :try_end_f} :catchall_19
if-nez v0, :cond_18
.line 6
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {v0, v1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->removeStream(I)Lcom/squareup/okhttp/internal/framed/FramedStream;
:cond_18
return-void
:catchall_19
move-exception v0
.line 7
:try_start_1a
monitor-exit p0
:try_end_1b
.catchall {:try_start_1a .. :try_end_1b} :catchall_19
throw v0
.end method
.method receiveHeaders(Ljava/util/List;Lcom/squareup/okhttp/internal/framed/HeadersMode;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;",
"Lcom/squareup/okhttp/internal/framed/HeadersMode;",
")V"
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x1
.line 1
monitor-enter p0
.line 2
:try_start_3
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
if-nez v2, :cond_1a
.line 3
invoke-virtual {p2}, Lcom/squareup/okhttp/internal/framed/HeadersMode;->failIfHeadersAbsent()Z
move-result p2
if-eqz p2, :cond_10
.line 4
sget-object v0, Lcom/squareup/okhttp/internal/framed/ErrorCode;->PROTOCOL_ERROR:Lcom/squareup/okhttp/internal/framed/ErrorCode;
goto :goto_32
.line 5
:cond_10
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
.line 6
invoke-virtual {p0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->isOpen()Z
move-result v1
.line 7
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
goto :goto_32
.line 8
:cond_1a
invoke-virtual {p2}, Lcom/squareup/okhttp/internal/framed/HeadersMode;->failIfHeadersPresent()Z
move-result p2
if-eqz p2, :cond_23
.line 9
sget-object v0, Lcom/squareup/okhttp/internal/framed/ErrorCode;->STREAM_IN_USE:Lcom/squareup/okhttp/internal/framed/ErrorCode;
goto :goto_32
.line 10
:cond_23
new-instance p2, Ljava/util/ArrayList;
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
.line 11
iget-object v2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
invoke-interface {p2, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
.line 12
invoke-interface {p2, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
.line 13
iput-object p2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
.line 14
:goto_32
monitor-exit p0
:try_end_33
.catchall {:try_start_3 .. :try_end_33} :catchall_43
if-eqz v0, :cond_39
.line 15
invoke-virtual {p0, v0}, Lcom/squareup/okhttp/internal/framed/FramedStream;->closeLater(Lcom/squareup/okhttp/internal/framed/ErrorCode;)V
goto :goto_42
:cond_39
if-nez v1, :cond_42
.line 16
iget-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget p2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {p1, p2}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->removeStream(I)Lcom/squareup/okhttp/internal/framed/FramedStream;
:cond_42
:goto_42
return-void
:catchall_43
move-exception p1
.line 17
:try_start_44
monitor-exit p0
:try_end_45
.catchall {:try_start_44 .. :try_end_45} :catchall_43
throw p1
.end method
.method declared-synchronized receiveRstStream(Lcom/squareup/okhttp/internal/framed/ErrorCode;)V
.registers 3
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
if-nez v0, :cond_a
.line 2
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->errorCode:Lcom/squareup/okhttp/internal/framed/ErrorCode;
.line 3
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_a
.catchall {:try_start_1 .. :try_end_a} :catchall_c
.line 4
:cond_a
monitor-exit p0
return-void
:catchall_c
move-exception p1
monitor-exit p0
throw p1
.end method
.method public reply(Ljava/util/List;Z)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/squareup/okhttp/internal/framed/Header;",
">;Z)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
.line 1
monitor-enter p0
if-eqz p1, :cond_2d
.line 2
:try_start_4
iget-object v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
if-nez v1, :cond_23
.line 3
iput-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->responseHeaders:Ljava/util/List;
const/4 v1, 0x1
if-nez p2, :cond_13
.line 4
iget-object p2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->sink:Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;
# setter for: Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->finished:Z
invoke-static {p2, v1}, Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;->access$202(Lcom/squareup/okhttp/internal/framed/FramedStream$FramedDataSink;Z)Z
const/4 v0, 0x1
.line 5
:cond_13
monitor-exit p0
:try_end_14
.catchall {:try_start_4 .. :try_end_14} :catchall_2b
.line 6
iget-object p2, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
iget v1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->id:I
invoke-virtual {p2, v1, v0, p1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->writeSynReply(IZLjava/util/List;)V
if-eqz v0, :cond_22
.line 7
iget-object p1, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->connection:Lcom/squareup/okhttp/internal/framed/FramedConnection;
invoke-virtual {p1}, Lcom/squareup/okhttp/internal/framed/FramedConnection;->flush()V
:cond_22
return-void
.line 8
:cond_23
:try_start_23
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "reply already sent"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:catchall_2b
move-exception p1
goto :goto_35
.line 9
:cond_2d
new-instance p1, Ljava/lang/NullPointerException;
const-string p2, "responseHeaders == null"
invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p1
.line 10
:goto_35
monitor-exit p0
:try_end_36
.catchall {:try_start_23 .. :try_end_36} :catchall_2b
throw p1
.end method
.method public writeTimeout()Lokio/Timeout;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/internal/framed/FramedStream;->writeTimeout:Lcom/squareup/okhttp/internal/framed/FramedStream$StreamTimeout;
return-object v0
.end method