123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- .class public final Lokhttp3/mockwebserver/RecordedRequest;
- .super Ljava/lang/Object;
- .source ""
- # instance fields
- .field private final body:Lokio/Buffer;
- .field private final bodySize:J
- .field private final chunkSizes:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/lang/Integer;",
- ">;"
- }
- .end annotation
- .end field
- .field private final headers:Lokhttp3/Headers;
- .field private final method:Ljava/lang/String;
- .field private final path:Ljava/lang/String;
- .field private final requestLine:Ljava/lang/String;
- .field private final requestUrl:Lokhttp3/HttpUrl;
- .field private final sequenceNumber:I
- .field private final tlsVersion:Lokhttp3/TlsVersion;
- # direct methods
- .method public constructor <init>(Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILjava/net/Socket;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/String;",
- "Lokhttp3/Headers;",
- "Ljava/util/List<",
- "Ljava/lang/Integer;",
- ">;J",
- "Lokio/Buffer;",
- "I",
- "Ljava/net/Socket;",
- ")V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestLine:Ljava/lang/String;
- iput-object p2, p0, Lokhttp3/mockwebserver/RecordedRequest;->headers:Lokhttp3/Headers;
- iput-object p3, p0, Lokhttp3/mockwebserver/RecordedRequest;->chunkSizes:Ljava/util/List;
- iput-wide p4, p0, Lokhttp3/mockwebserver/RecordedRequest;->bodySize:J
- iput-object p6, p0, Lokhttp3/mockwebserver/RecordedRequest;->body:Lokio/Buffer;
- iput p7, p0, Lokhttp3/mockwebserver/RecordedRequest;->sequenceNumber:I
- instance-of p2, p8, Ljavax/net/ssl/SSLSocket;
- const/4 p3, 0x0
- if-eqz p2, :cond_0
- move-object p4, p8
- check-cast p4, Ljavax/net/ssl/SSLSocket;
- invoke-virtual {p4}, Ljavax/net/ssl/SSLSocket;->getSession()Ljavax/net/ssl/SSLSession;
- move-result-object p4
- invoke-interface {p4}, Ljavax/net/ssl/SSLSession;->getProtocol()Ljava/lang/String;
- move-result-object p4
- invoke-static {p4}, Lokhttp3/TlsVersion;->forJavaName(Ljava/lang/String;)Lokhttp3/TlsVersion;
- move-result-object p4
- goto :goto_0
- :cond_0
- move-object p4, p3
- :goto_0
- iput-object p4, p0, Lokhttp3/mockwebserver/RecordedRequest;->tlsVersion:Lokhttp3/TlsVersion;
- if-eqz p1, :cond_2
- const/16 p3, 0x20
- invoke-virtual {p1, p3}, Ljava/lang/String;->indexOf(I)I
- move-result p4
- add-int/lit8 p5, p4, 0x1
- invoke-virtual {p1, p3, p5}, Ljava/lang/String;->indexOf(II)I
- move-result p3
- const/4 p6, 0x0
- invoke-virtual {p1, p6, p4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object p4
- iput-object p4, p0, Lokhttp3/mockwebserver/RecordedRequest;->method:Ljava/lang/String;
- invoke-virtual {p1, p5, p3}, Ljava/lang/String;->substring(II)Ljava/lang/String;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/mockwebserver/RecordedRequest;->path:Ljava/lang/String;
- if-eqz p2, :cond_1
- const-string p1, "https"
- goto :goto_1
- :cond_1
- const-string p1, "http"
- :goto_1
- invoke-virtual {p8}, Ljava/net/Socket;->getInetAddress()Ljava/net/InetAddress;
- move-result-object p2
- invoke-virtual {p2}, Ljava/net/InetAddress;->getHostName()Ljava/lang/String;
- move-result-object p2
- invoke-virtual {p8}, Ljava/net/Socket;->getLocalPort()I
- move-result p3
- const/4 p4, 0x4
- new-array p4, p4, [Ljava/lang/Object;
- aput-object p1, p4, p6
- const/4 p1, 0x1
- aput-object p2, p4, p1
- const/4 p1, 0x2
- invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
- move-result-object p2
- aput-object p2, p4, p1
- const/4 p1, 0x3
- iget-object p2, p0, Lokhttp3/mockwebserver/RecordedRequest;->path:Ljava/lang/String;
- aput-object p2, p4, p1
- const-string p1, "%s://%s:%s%s"
- invoke-static {p1, p4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
- move-result-object p1
- invoke-static {p1}, Lokhttp3/HttpUrl;->parse(Ljava/lang/String;)Lokhttp3/HttpUrl;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestUrl:Lokhttp3/HttpUrl;
- goto :goto_2
- :cond_2
- iput-object p3, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestUrl:Lokhttp3/HttpUrl;
- iput-object p3, p0, Lokhttp3/mockwebserver/RecordedRequest;->method:Ljava/lang/String;
- iput-object p3, p0, Lokhttp3/mockwebserver/RecordedRequest;->path:Ljava/lang/String;
- :goto_2
- return-void
- .end method
- # virtual methods
- .method public getBody()Lokio/Buffer;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->body:Lokio/Buffer;
- return-object v0
- .end method
- .method public getBodySize()J
- .locals 2
- iget-wide v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->bodySize:J
- return-wide v0
- .end method
- .method public getChunkSizes()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Ljava/lang/Integer;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->chunkSizes:Ljava/util/List;
- return-object v0
- .end method
- .method public getHeader(Ljava/lang/String;)Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->headers:Lokhttp3/Headers;
- invoke-virtual {v0, p1}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
- move-result-object p1
- invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
- move-result v0
- if-eqz v0, :cond_0
- const/4 p1, 0x0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- check-cast p1, Ljava/lang/String;
- :goto_0
- return-object p1
- .end method
- .method public getHeaders()Lokhttp3/Headers;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->headers:Lokhttp3/Headers;
- return-object v0
- .end method
- .method public getMethod()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->method:Ljava/lang/String;
- return-object v0
- .end method
- .method public getPath()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->path:Ljava/lang/String;
- return-object v0
- .end method
- .method public getRequestLine()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestLine:Ljava/lang/String;
- return-object v0
- .end method
- .method public getRequestUrl()Lokhttp3/HttpUrl;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestUrl:Lokhttp3/HttpUrl;
- return-object v0
- .end method
- .method public getSequenceNumber()I
- .locals 1
- iget v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->sequenceNumber:I
- return v0
- .end method
- .method public getTlsVersion()Lokhttp3/TlsVersion;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->tlsVersion:Lokhttp3/TlsVersion;
- return-object v0
- .end method
- .method public getUtf8Body()Ljava/lang/String;
- .locals 1
- invoke-virtual {p0}, Lokhttp3/mockwebserver/RecordedRequest;->getBody()Lokio/Buffer;
- move-result-object v0
- invoke-virtual {v0}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public toString()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/RecordedRequest;->requestLine:Ljava/lang/String;
- return-object v0
- .end method
|