.class public final Lokhttp3/internal/http2/Http2Stream; .super Ljava/lang/Object; .source "" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lokhttp3/internal/http2/Http2Stream$StreamTimeout;, Lokhttp3/internal/http2/Http2Stream$FramingSink;, Lokhttp3/internal/http2/Http2Stream$FramingSource; } .end annotation # static fields .field static final synthetic $assertionsDisabled:Z # instance fields .field bytesLeftInWriteWindow:J .field final connection:Lokhttp3/internal/http2/Http2Connection; .field errorCode:Lokhttp3/internal/http2/ErrorCode; .field private hasResponseHeaders:Z .field final id:I .field final readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; .field private final requestHeaders:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;" } .end annotation .end field .field private responseHeaders:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;" } .end annotation .end field .field final sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; .field private final source:Lokhttp3/internal/http2/Http2Stream$FramingSource; .field unacknowledgedBytesRead:J .field final writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; # direct methods .method static constructor ()V .locals 0 return-void .end method .method constructor (ILokhttp3/internal/http2/Http2Connection;ZZLjava/util/List;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(I", "Lokhttp3/internal/http2/Http2Connection;", "ZZ", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;)V" } .end annotation invoke-direct {p0}, Ljava/lang/Object;->()V const-wide/16 v0, 0x0 iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J new-instance v0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout; invoke-direct {v0, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->(Lokhttp3/internal/http2/Http2Stream;)V iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; new-instance v0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout; invoke-direct {v0, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->(Lokhttp3/internal/http2/Http2Stream;)V iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; const/4 v0, 0x0 iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; if-eqz p2, :cond_1 if-eqz p5, :cond_0 iput p1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I iput-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget-object p1, p2, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings; invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I move-result p1 int-to-long v0, p1 iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J new-instance p1, Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-object p2, p2, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings; invoke-virtual {p2}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I move-result p2 int-to-long v0, p2 invoke-direct {p1, p0, v0, v1}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->(Lokhttp3/internal/http2/Http2Stream;J)V iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; new-instance p1, Lokhttp3/internal/http2/Http2Stream$FramingSink; invoke-direct {p1, p0}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->(Lokhttp3/internal/http2/Http2Stream;)V iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iput-boolean p4, p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iput-boolean p3, p1, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z iput-object p5, p0, Lokhttp3/internal/http2/Http2Stream;->requestHeaders:Ljava/util/List; return-void :cond_0 new-instance p1, Ljava/lang/NullPointerException; const-string p2, "requestHeaders == null" invoke-direct {p1, p2}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 :cond_1 new-instance p1, Ljava/lang/NullPointerException; const-string p2, "connection == null" invoke-direct {p1, p2}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .end method .method private closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; const/4 v1, 0x0 if-eqz v0, :cond_0 monitor-exit p0 return v1 :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z if-eqz v0, :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z if-eqz v0, :cond_1 monitor-exit p0 return v1 :cond_1 iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream; const/4 p1, 0x1 return p1 :catchall_0 move-exception p1 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p1 .end method # virtual methods .method addBytesToWriteWindow(J)V .locals 3 iget-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J add-long/2addr v0, p1 iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J const-wide/16 v0, 0x0 cmp-long v2, p1, v0 if-lez v2, :cond_0 invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V :cond_0 return-void .end method .method cancelStreamIfNecessary()V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z if-nez v0, :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z if-eqz v0, :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z if-nez v0, :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 goto :goto_0 :cond_1 const/4 v0, 0x0 :goto_0 invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z move-result v1 monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v0, :cond_2 sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode; invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;)V goto :goto_1 :cond_2 if-nez v1, :cond_3 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream; :cond_3 :goto_1 return-void :catchall_0 move-exception v0 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method checkOutNotClosed()V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z if-nez v1, :cond_2 iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z if-nez v0, :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; if-nez v0, :cond_0 return-void :cond_0 new-instance v1, Lokhttp3/internal/http2/StreamResetException; invoke-direct {v1, v0}, Lokhttp3/internal/http2/StreamResetException;->(Lokhttp3/internal/http2/ErrorCode;)V throw v1 :cond_1 new-instance v0, Ljava/io/IOException; const-string v1, "stream finished" invoke-direct {v0, v1}, Ljava/io/IOException;->(Ljava/lang/String;)V throw v0 :cond_2 new-instance v0, Ljava/io/IOException; const-string v1, "stream closed" invoke-direct {v0, v1}, Ljava/io/IOException;->(Ljava/lang/String;)V throw v0 .end method .method public close(Lokhttp3/internal/http2/ErrorCode;)V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation invoke-direct {p0, p1}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z move-result v0 if-nez v0, :cond_0 return-void :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V return-void .end method .method public closeLater(Lokhttp3/internal/http2/ErrorCode;)V .locals 2 invoke-direct {p0, p1}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z move-result v0 if-nez v0, :cond_0 return-void :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V return-void .end method .method public getConnection()Lokhttp3/internal/http2/Http2Connection; .locals 1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; return-object v0 .end method .method public declared-synchronized getErrorCode()Lokhttp3/internal/http2/ErrorCode; .locals 1 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-object v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public getId()I .locals 1 iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I return v0 .end method .method public getRequestHeaders()Ljava/util/List; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;" } .end annotation iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->requestHeaders:Ljava/util/List; return-object v0 .end method .method public getSink()Lokio/Sink; .locals 2 monitor-enter p0 :try_start_0 iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z if-nez v0, :cond_1 invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 new-instance v0, Ljava/lang/IllegalStateException; const-string v1, "reply before requesting the sink" invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v0 :cond_1 :goto_0 monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; return-object v0 :catchall_0 move-exception v0 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method public getSource()Lokio/Source; .locals 1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; return-object v0 .end method .method public isLocallyInitiated()Z .locals 4 iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I const/4 v1, 0x1 and-int/2addr v0, v1 const/4 v2, 0x0 if-ne v0, v1, :cond_0 const/4 v0, 0x1 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget-boolean v3, v3, Lokhttp3/internal/http2/Http2Connection;->client:Z if-ne v3, v0, :cond_1 goto :goto_1 :cond_1 const/4 v1, 0x0 :goto_1 return v1 .end method .method public declared-synchronized isOpen()Z .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 v1, 0x0 if-eqz v0, :cond_0 monitor-exit p0 return v1 :cond_0 :try_start_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z if-nez v0, :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z if-eqz v0, :cond_3 :cond_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z if-nez v0, :cond_2 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z if-eqz v0, :cond_3 :cond_2 iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 if-eqz v0, :cond_3 monitor-exit p0 return v1 :cond_3 const/4 v0, 0x1 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public readTimeout()Lokio/Timeout; .locals 1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; return-object v0 .end method .method receiveData(Lokio/BufferedSource;I)V .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; int-to-long v1, p2 invoke-virtual {v0, p1, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receive(Lokio/BufferedSource;J)V return-void .end method .method receiveFin()V .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource; const/4 v1, 0x1 iput-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z move-result v0 invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-nez v0, :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream; :cond_0 return-void :catchall_0 move-exception v0 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 .end method .method receiveHeaders(Ljava/util/List;)V .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;)V" } .end annotation monitor-enter p0 const/4 v0, 0x1 :try_start_0 iput-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; if-nez v1, :cond_0 iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z move-result v0 invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V goto :goto_0 :cond_0 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; invoke-interface {v1, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z const/4 v2, 0x0 invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z invoke-interface {v1, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; :goto_0 monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-nez v0, :cond_1 iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream; :cond_1 return-void :catchall_0 move-exception p1 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p1 .end method .method declared-synchronized receiveRstStream(Lokhttp3/internal/http2/ErrorCode;)V .locals 1 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; if-nez v0, :cond_0 iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_0 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public sendResponseHeaders(Ljava/util/List;Z)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;Z)V" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation if-eqz p1, :cond_2 const/4 v0, 0x0 monitor-enter p0 const/4 v1, 0x1 :try_start_0 iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z if-nez p2, :cond_0 iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink; iput-boolean v1, p2, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z const/4 v0, 0x1 :cond_0 monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I invoke-virtual {p2, v1, v0, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynReply(IZLjava/util/List;)V if-eqz v0, :cond_1 iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection; invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Connection;->flush()V :cond_1 return-void :catchall_0 move-exception p1 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p1 :cond_2 new-instance p1, Ljava/lang/NullPointerException; const-string p2, "responseHeaders == null" invoke-direct {p1, p2}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .end method .method public declared-synchronized takeResponseHeaders()Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation monitor-enter p0 :try_start_0 invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z move-result v0 if-eqz v0, :cond_2 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 :goto_0 :try_start_1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; if-nez v0, :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; if-nez v0, :cond_0 invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 goto :goto_0 :cond_0 :try_start_2 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; if-eqz v0, :cond_1 const/4 v1, 0x0 iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List; :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 monitor-exit p0 return-object v0 :cond_1 :try_start_3 new-instance v0, Lokhttp3/internal/http2/StreamResetException; iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode; invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;->(Lokhttp3/internal/http2/ErrorCode;)V throw v0 :catchall_0 move-exception v0 iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V throw v0 :cond_2 new-instance v0, Ljava/lang/IllegalStateException; const-string v1, "servers cannot read response headers" invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v0 :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_1 :catchall_1 move-exception v0 monitor-exit p0 goto :goto_2 :goto_1 throw v0 :goto_2 goto :goto_1 .end method .method waitForIo()V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/InterruptedIOException; } .end annotation :try_start_0 invoke-virtual {p0}, Ljava/lang/Object;->wait()V :try_end_0 .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0 return-void :catch_0 new-instance v0, Ljava/io/InterruptedIOException; invoke-direct {v0}, Ljava/io/InterruptedIOException;->()V throw v0 .end method .method public writeTimeout()Lokio/Timeout; .locals 1 iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout; return-object v0 .end method