ExceptionCatchingTypedInput.java
3.8 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
package retrofit;
import java.io.IOException;
import java.io.InputStream;
import retrofit.mime.TypedInput;
class ExceptionCatchingTypedInput
implements TypedInput
{
private final TypedInput delegate;
private final ExceptionCatchingInputStream delegateStream;
ExceptionCatchingTypedInput(TypedInput paramTypedInput)
throws IOException
{
this.delegate = paramTypedInput;
this.delegateStream = new ExceptionCatchingInputStream(paramTypedInput.in());
}
IOException getThrownException()
{
return this.delegateStream.thrownException;
}
public InputStream in()
throws IOException
{
return this.delegateStream;
}
public long length()
{
return this.delegate.length();
}
public String mimeType()
{
return this.delegate.mimeType();
}
boolean threwException()
{
return this.delegateStream.thrownException != null;
}
static class ExceptionCatchingInputStream
extends InputStream
{
private final InputStream delegate;
private IOException thrownException;
ExceptionCatchingInputStream(InputStream paramInputStream)
{
this.delegate = paramInputStream;
}
public int available()
throws IOException
{
try
{
int i = this.delegate.available();
return i;
}
catch (IOException localIOException)
{
this.thrownException = localIOException;
throw localIOException;
}
}
public void close()
throws IOException
{
try
{
this.delegate.close();
return;
}
catch (IOException localIOException)
{
this.thrownException = localIOException;
throw localIOException;
}
}
public void mark(int paramInt)
{
try
{
this.delegate.mark(paramInt);
return;
}
finally
{
localObject = finally;
throw ((Throwable)localObject);
}
}
public boolean markSupported()
{
return this.delegate.markSupported();
}
public int read()
throws IOException
{
try
{
int i = this.delegate.read();
return i;
}
catch (IOException localIOException)
{
this.thrownException = localIOException;
throw localIOException;
}
}
public int read(byte[] paramArrayOfByte)
throws IOException
{
try
{
int i = this.delegate.read(paramArrayOfByte);
return i;
}
catch (IOException paramArrayOfByte)
{
this.thrownException = paramArrayOfByte;
throw paramArrayOfByte;
}
}
public int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException
{
try
{
paramInt1 = this.delegate.read(paramArrayOfByte, paramInt1, paramInt2);
return paramInt1;
}
catch (IOException paramArrayOfByte)
{
this.thrownException = paramArrayOfByte;
throw paramArrayOfByte;
}
}
public void reset()
throws IOException
{
try
{
this.delegate.reset();
return;
}
catch (IOException localIOException)
{
this.thrownException = localIOException;
throw localIOException;
}
finally {}
}
public long skip(long paramLong)
throws IOException
{
try
{
paramLong = this.delegate.skip(paramLong);
return paramLong;
}
catch (IOException localIOException)
{
this.thrownException = localIOException;
throw localIOException;
}
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/retrofit/ExceptionCatchingTypedInput.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/