Streams.smali
4.1 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
.class public final Lcom/google/gson/internal/Streams;
.super Ljava/lang/Object;
.source "Streams.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/gson/internal/Streams$AppendableWriter;
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 1
.line 36
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 37
new-instance v0, Ljava/lang/UnsupportedOperationException;
invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V
throw v0
.end method
.method public static parse(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/gson/JsonParseException;
}
.end annotation
.line 46
:try_start_0
invoke-virtual {p0}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
:try_end_0
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_4
.catch Lcom/google/gson/stream/MalformedJsonException; {:try_start_0 .. :try_end_0} :catch_3
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_1
const/4 v0, 0x0
.line 48
:try_start_1
sget-object v1, Lcom/google/gson/internal/bind/TypeAdapters;->JSON_ELEMENT:Lcom/google/gson/TypeAdapter;
invoke-virtual {v1, p0}, Lcom/google/gson/TypeAdapter;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Lcom/google/gson/JsonElement;
:try_end_1
.catch Ljava/io/EOFException; {:try_start_1 .. :try_end_1} :catch_0
.catch Lcom/google/gson/stream/MalformedJsonException; {:try_start_1 .. :try_end_1} :catch_3
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
.catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_1
return-object p0
:catch_0
move-exception p0
goto :goto_0
:catch_1
move-exception p0
.line 64
new-instance v0, Lcom/google/gson/JsonSyntaxException;
invoke-direct {v0, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
throw v0
:catch_2
move-exception p0
.line 62
new-instance v0, Lcom/google/gson/JsonIOException;
invoke-direct {v0, p0}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
throw v0
:catch_3
move-exception p0
.line 60
new-instance v0, Lcom/google/gson/JsonSyntaxException;
invoke-direct {v0, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
throw v0
:catch_4
move-exception p0
const/4 v0, 0x1
:goto_0
if-eqz v0, :cond_0
.line 55
sget-object p0, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
return-object p0
.line 58
:cond_0
new-instance v0, Lcom/google/gson/JsonSyntaxException;
invoke-direct {v0, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public static write(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 72
sget-object v0, Lcom/google/gson/internal/bind/TypeAdapters;->JSON_ELEMENT:Lcom/google/gson/TypeAdapter;
invoke-virtual {v0, p1, p0}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
return-void
.end method
.method public static writerForAppendable(Ljava/lang/Appendable;)Ljava/io/Writer;
.locals 1
.line 76
instance-of v0, p0, Ljava/io/Writer;
if-eqz v0, :cond_0
check-cast p0, Ljava/io/Writer;
goto :goto_0
:cond_0
new-instance v0, Lcom/google/gson/internal/Streams$AppendableWriter;
invoke-direct {v0, p0}, Lcom/google/gson/internal/Streams$AppendableWriter;-><init>(Ljava/lang/Appendable;)V
move-object p0, v0
:goto_0
return-object p0
.end method