Settings.java
4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
package com.squareup.okhttp.internal.framed;
import java.util.Arrays;
public final class Settings
{
static final int CLIENT_CERTIFICATE_VECTOR_SIZE = 8;
static final int COUNT = 10;
static final int CURRENT_CWND = 5;
static final int DEFAULT_INITIAL_WINDOW_SIZE = 65536;
static final int DOWNLOAD_BANDWIDTH = 2;
static final int DOWNLOAD_RETRANS_RATE = 6;
static final int ENABLE_PUSH = 2;
static final int FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 1;
static final int FLOW_CONTROL_OPTIONS = 10;
static final int FLOW_CONTROL_OPTIONS_DISABLED = 1;
static final int HEADER_TABLE_SIZE = 1;
static final int INITIAL_WINDOW_SIZE = 7;
static final int MAX_CONCURRENT_STREAMS = 4;
static final int MAX_FRAME_SIZE = 5;
static final int MAX_HEADER_LIST_SIZE = 6;
static final int PERSISTED = 2;
static final int PERSIST_VALUE = 1;
static final int ROUND_TRIP_TIME = 3;
static final int UPLOAD_BANDWIDTH = 1;
private int persistValue;
private int persisted;
private int set;
private final int[] values = new int[10];
final void clear()
{
this.persisted = 0;
this.persistValue = 0;
this.set = 0;
Arrays.fill(this.values, 0);
}
final int flags(int paramInt)
{
int i = 0;
if (isPersisted(paramInt)) {
i = 2;
}
int j = i;
if (persistValue(paramInt)) {
j = i | 0x1;
}
return j;
}
final int get(int paramInt)
{
return this.values[paramInt];
}
final int getClientCertificateVectorSize(int paramInt)
{
if ((this.set & 0x100) != 0) {
paramInt = this.values[8];
}
return paramInt;
}
final int getCurrentCwnd(int paramInt)
{
if ((this.set & 0x20) != 0) {
paramInt = this.values[5];
}
return paramInt;
}
final int getDownloadBandwidth(int paramInt)
{
if ((this.set & 0x4) != 0) {
paramInt = this.values[2];
}
return paramInt;
}
final int getDownloadRetransRate(int paramInt)
{
if ((this.set & 0x40) != 0) {
paramInt = this.values[6];
}
return paramInt;
}
final boolean getEnablePush(boolean paramBoolean)
{
int i;
if ((this.set & 0x4) != 0) {
i = this.values[2];
}
while (i == 1)
{
return true;
if (paramBoolean) {
i = 1;
} else {
i = 0;
}
}
return false;
}
final int getHeaderTableSize()
{
if ((this.set & 0x2) != 0) {
return this.values[1];
}
return -1;
}
final int getInitialWindowSize(int paramInt)
{
if ((this.set & 0x80) != 0) {
paramInt = this.values[7];
}
return paramInt;
}
final int getMaxConcurrentStreams(int paramInt)
{
if ((this.set & 0x10) != 0) {
paramInt = this.values[4];
}
return paramInt;
}
final int getMaxFrameSize(int paramInt)
{
if ((this.set & 0x20) != 0) {
paramInt = this.values[5];
}
return paramInt;
}
final int getMaxHeaderListSize(int paramInt)
{
if ((this.set & 0x40) != 0) {
paramInt = this.values[6];
}
return paramInt;
}
final int getRoundTripTime(int paramInt)
{
if ((this.set & 0x8) != 0) {
paramInt = this.values[3];
}
return paramInt;
}
final int getUploadBandwidth(int paramInt)
{
if ((this.set & 0x2) != 0) {
paramInt = this.values[1];
}
return paramInt;
}
final boolean isFlowControlDisabled()
{
boolean bool = false;
if ((this.set & 0x400) != 0) {}
for (int i = this.values[10];; i = 0)
{
if ((i & 0x1) != 0) {
bool = true;
}
return bool;
}
}
final boolean isPersisted(int paramInt)
{
return (1 << paramInt & this.persisted) != 0;
}
final boolean isSet(int paramInt)
{
return (1 << paramInt & this.set) != 0;
}
final void merge(Settings paramSettings)
{
int i = 0;
while (i < 10)
{
if (paramSettings.isSet(i)) {
set(i, paramSettings.flags(i), paramSettings.get(i));
}
i += 1;
}
}
final boolean persistValue(int paramInt)
{
return (1 << paramInt & this.persistValue) != 0;
}
final Settings set(int paramInt1, int paramInt2, int paramInt3)
{
if (paramInt1 >= this.values.length) {
return this;
}
int i = 1 << paramInt1;
this.set |= i;
if ((paramInt2 & 0x1) != 0)
{
this.persistValue |= i;
if ((paramInt2 & 0x2) == 0) {
break label86;
}
}
label86:
for (this.persisted = (i | this.persisted);; this.persisted = ((i ^ 0xFFFFFFFF) & this.persisted))
{
this.values[paramInt1] = paramInt3;
return this;
this.persistValue &= (i ^ 0xFFFFFFFF);
break;
}
}
final int size()
{
return Integer.bitCount(this.set);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/okhttp/internal/framed/Settings.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/