Header.java
2.11 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
package com.squareup.okhttp.internal.framed;
import okio.ByteString;
public final class Header
{
public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status");
public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority");
public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host");
public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method");
public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path");
public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme");
public static final ByteString VERSION = ByteString.encodeUtf8(":version");
final int hpackSize;
public final ByteString name;
public final ByteString value;
public Header(String paramString1, String paramString2)
{
this(ByteString.encodeUtf8(paramString1), ByteString.encodeUtf8(paramString2));
}
public Header(ByteString paramByteString, String paramString)
{
this(paramByteString, ByteString.encodeUtf8(paramString));
}
public Header(ByteString paramByteString1, ByteString paramByteString2)
{
this.name = paramByteString1;
this.value = paramByteString2;
this.hpackSize = (paramByteString1.size() + 32 + paramByteString2.size());
}
public final boolean equals(Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof Header))
{
paramObject = (Header)paramObject;
bool1 = bool2;
if (this.name.equals(((Header)paramObject).name))
{
bool1 = bool2;
if (this.value.equals(((Header)paramObject).value)) {
bool1 = true;
}
}
}
return bool1;
}
public final int hashCode()
{
return (this.name.hashCode() + 527) * 31 + this.value.hashCode();
}
public final String toString()
{
return String.format("%s: %s", new Object[] { this.name.utf8(), this.value.utf8() });
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/okhttp/internal/framed/Header.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/