123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- .class public final Lokhttp3/internal/http2/Settings;
- .super Ljava/lang/Object;
- .source ""
- # static fields
- .field static final COUNT:I = 0xa
- .field static final DEFAULT_INITIAL_WINDOW_SIZE:I = 0xffff
- .field static final ENABLE_PUSH:I = 0x2
- .field static final HEADER_TABLE_SIZE:I = 0x1
- .field static final INITIAL_WINDOW_SIZE:I = 0x7
- .field static final MAX_CONCURRENT_STREAMS:I = 0x4
- .field static final MAX_FRAME_SIZE:I = 0x5
- .field static final MAX_HEADER_LIST_SIZE:I = 0x6
- # instance fields
- .field private set:I
- .field private final values:[I
- # direct methods
- .method public constructor <init>()V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- const/16 v0, 0xa
- new-array v0, v0, [I
- iput-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
- return-void
- .end method
- # virtual methods
- .method clear()V
- .locals 2
- const/4 v0, 0x0
- iput v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- iget-object v1, p0, Lokhttp3/internal/http2/Settings;->values:[I
- invoke-static {v1, v0}, Ljava/util/Arrays;->fill([II)V
- return-void
- .end method
- .method get(I)I
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
- aget p1, v0, p1
- return p1
- .end method
- .method getEnablePush(Z)Z
- .locals 3
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit8 v0, v0, 0x4
- const/4 v1, 0x0
- const/4 v2, 0x1
- if-eqz v0, :cond_0
- iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v0, 0x2
- aget p1, p1, v0
- goto :goto_0
- :cond_0
- if-eqz p1, :cond_1
- const/4 p1, 0x1
- goto :goto_0
- :cond_1
- const/4 p1, 0x0
- :goto_0
- if-ne p1, v2, :cond_2
- const/4 v1, 0x1
- :cond_2
- return v1
- .end method
- .method getHeaderTableSize()I
- .locals 2
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit8 v0, v0, 0x2
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v1, 0x1
- aget v0, v0, v1
- goto :goto_0
- :cond_0
- const/4 v0, -0x1
- :goto_0
- return v0
- .end method
- .method getInitialWindowSize()I
- .locals 2
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit16 v0, v0, 0x80
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v1, 0x7
- aget v0, v0, v1
- goto :goto_0
- :cond_0
- const v0, 0xffff
- :goto_0
- return v0
- .end method
- .method getMaxConcurrentStreams(I)I
- .locals 1
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit8 v0, v0, 0x10
- if-eqz v0, :cond_0
- iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v0, 0x4
- aget p1, p1, v0
- :cond_0
- return p1
- .end method
- .method getMaxFrameSize(I)I
- .locals 1
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit8 v0, v0, 0x20
- if-eqz v0, :cond_0
- iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v0, 0x5
- aget p1, p1, v0
- :cond_0
- return p1
- .end method
- .method getMaxHeaderListSize(I)I
- .locals 1
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/lit8 v0, v0, 0x40
- if-eqz v0, :cond_0
- iget-object p1, p0, Lokhttp3/internal/http2/Settings;->values:[I
- const/4 v0, 0x6
- aget p1, p1, v0
- :cond_0
- return p1
- .end method
- .method isSet(I)Z
- .locals 2
- const/4 v0, 0x1
- shl-int p1, v0, p1
- iget v1, p0, Lokhttp3/internal/http2/Settings;->set:I
- and-int/2addr p1, v1
- if-eqz p1, :cond_0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method merge(Lokhttp3/internal/http2/Settings;)V
- .locals 2
- const/4 v0, 0x0
- :goto_0
- const/16 v1, 0xa
- if-ge v0, v1, :cond_1
- invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->isSet(I)Z
- move-result v1
- if-nez v1, :cond_0
- goto :goto_1
- :cond_0
- invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Settings;->get(I)I
- move-result v1
- invoke-virtual {p0, v0, v1}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
- :goto_1
- add-int/lit8 v0, v0, 0x1
- goto :goto_0
- :cond_1
- return-void
- .end method
- .method set(II)Lokhttp3/internal/http2/Settings;
- .locals 3
- if-ltz p1, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Settings;->values:[I
- array-length v1, v0
- if-lt p1, v1, :cond_0
- goto :goto_0
- :cond_0
- const/4 v1, 0x1
- shl-int/2addr v1, p1
- iget v2, p0, Lokhttp3/internal/http2/Settings;->set:I
- or-int/2addr v1, v2
- iput v1, p0, Lokhttp3/internal/http2/Settings;->set:I
- aput p2, v0, p1
- :cond_1
- :goto_0
- return-object p0
- .end method
- .method size()I
- .locals 1
- iget v0, p0, Lokhttp3/internal/http2/Settings;->set:I
- invoke-static {v0}, Ljava/lang/Integer;->bitCount(I)I
- move-result v0
- return v0
- .end method
|