DeflaterSink.java
3.54 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
package okio;
import java.io.IOException;
import java.util.zip.Deflater;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
import tx;
import ty;
import ua;
public final class DeflaterSink
implements Sink
{
private final BufferedSink a;
private final Deflater b;
private boolean c;
DeflaterSink(BufferedSink paramBufferedSink, Deflater paramDeflater)
{
if (paramBufferedSink == null) {
throw new IllegalArgumentException("source == null");
}
if (paramDeflater == null) {
throw new IllegalArgumentException("inflater == null");
}
this.a = paramBufferedSink;
this.b = paramDeflater;
}
public DeflaterSink(Sink paramSink, Deflater paramDeflater)
{
this(Okio.buffer(paramSink), paramDeflater);
}
@IgnoreJRERequirement
private void a(boolean paramBoolean)
throws IOException
{
Buffer localBuffer = this.a.buffer();
tx localtx;
label119:
do
{
localtx = localBuffer.a(1);
if (paramBoolean) {}
for (int i = this.b.deflate(localtx.a, localtx.c, 2048 - localtx.c, 2);; i = this.b.deflate(localtx.a, localtx.c, 2048 - localtx.c))
{
if (i <= 0) {
break label119;
}
localtx.c += i;
localBuffer.b += i;
this.a.emitCompleteSegments();
break;
}
} while (!this.b.needsInput());
if (localtx.b == localtx.c)
{
localBuffer.a = localtx.a();
ty.a(localtx);
}
}
final void a()
throws IOException
{
this.b.finish();
a(false);
}
public final void close()
throws IOException
{
if (this.c) {}
for (;;)
{
return;
Object localObject3 = null;
try
{
a();
try
{
this.b.end();
localObject1 = localObject3;
}
catch (Throwable localThrowable1)
{
for (;;)
{
Object localObject1;
label34:
if (localObject3 != null) {
localObject2 = localObject3;
}
}
}
try
{
this.a.close();
localObject3 = localObject1;
}
catch (Throwable localThrowable3)
{
localObject3 = localObject2;
if (localObject2 != null) {
break label34;
}
localObject3 = localThrowable3;
break label34;
}
this.c = true;
if (localObject3 == null) {
continue;
}
ua.a((Throwable)localObject3);
return;
}
catch (Throwable localThrowable2)
{
Object localObject2;
for (;;) {}
}
}
}
public final void flush()
throws IOException
{
a(true);
this.a.flush();
}
public final Timeout timeout()
{
return this.a.timeout();
}
public final String toString()
{
return "DeflaterSink(" + this.a + ")";
}
public final void write(Buffer paramBuffer, long paramLong)
throws IOException
{
ua.a(paramBuffer.b, 0L, paramLong);
while (paramLong > 0L)
{
tx localtx = paramBuffer.a;
int i = (int)Math.min(paramLong, localtx.c - localtx.b);
this.b.setInput(localtx.a, localtx.b, i);
a(false);
paramBuffer.b -= i;
localtx.b += i;
if (localtx.b == localtx.c)
{
paramBuffer.a = localtx.a();
ty.a(localtx);
}
paramLong -= i;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/okio/DeflaterSink.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/