241 lines
6.3 KiB
Smali
241 lines
6.3 KiB
Smali
.class Lcom/bugsnag/android/JsonStream;
|
|
.super Lcom/bugsnag/android/JsonWriter;
|
|
.source "JsonStream.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/bugsnag/android/JsonStream$Streamable;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final out:Ljava/io/Writer;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Ljava/io/Writer;)V
|
|
.locals 0
|
|
.param p1, "out" # Ljava/io/Writer;
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1}, Lcom/bugsnag/android/JsonWriter;-><init>(Ljava/io/Writer;)V
|
|
|
|
iput-object p1, p0, Lcom/bugsnag/android/JsonStream;->out:Ljava/io/Writer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public name(Ljava/lang/String;)Lcom/bugsnag/android/JsonStream;
|
|
.locals 0
|
|
.param p1, "name" # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-super {p0, p1}, Lcom/bugsnag/android/JsonWriter;->name(Ljava/lang/String;)Lcom/bugsnag/android/JsonWriter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public bridge synthetic name(Ljava/lang/String;)Lcom/bugsnag/android/JsonWriter;
|
|
.locals 1
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-virtual {p0, p1}, Lcom/bugsnag/android/JsonStream;->name(Ljava/lang/String;)Lcom/bugsnag/android/JsonStream;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public value(Ljava/lang/Number;)Lcom/bugsnag/android/JsonWriter;
|
|
.locals 1
|
|
.param p1, "value" # Ljava/lang/Number;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/bugsnag/android/JsonStream;->nullValue()Lcom/bugsnag/android/JsonWriter;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-super {p0, p1}, Lcom/bugsnag/android/JsonWriter;->value(Ljava/lang/Number;)Lcom/bugsnag/android/JsonWriter;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public value(Ljava/lang/String;)Lcom/bugsnag/android/JsonWriter;
|
|
.locals 1
|
|
.param p1, "value" # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/bugsnag/android/JsonStream;->nullValue()Lcom/bugsnag/android/JsonWriter;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-super {p0, p1}, Lcom/bugsnag/android/JsonWriter;->value(Ljava/lang/String;)Lcom/bugsnag/android/JsonWriter;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public value(Lcom/bugsnag/android/JsonStream$Streamable;)V
|
|
.locals 0
|
|
.param p1, "streamable" # Lcom/bugsnag/android/JsonStream$Streamable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-interface {p1, p0}, Lcom/bugsnag/android/JsonStream$Streamable;->toStream(Lcom/bugsnag/android/JsonStream;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public value(Ljava/io/File;)V
|
|
.locals 3
|
|
.param p1, "file" # Ljava/io/File;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-super {p0}, Lcom/bugsnag/android/JsonWriter;->flush()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.local v0, "input":Ljava/io/FileReader;
|
|
:try_start_0
|
|
new-instance v1, Ljava/io/FileReader;
|
|
|
|
invoke-direct {v1, p1}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.end local v0 # "input":Ljava/io/FileReader;
|
|
.local v1, "input":Ljava/io/FileReader;
|
|
:try_start_1
|
|
iget-object v2, p0, Lcom/bugsnag/android/JsonStream;->out:Ljava/io/Writer;
|
|
|
|
invoke-static {v1, v2}, Lcom/bugsnag/android/IOUtils;->copy(Ljava/io/Reader;Ljava/io/Writer;)I
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
invoke-static {v1}, Lcom/bugsnag/android/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
iget-object v2, p0, Lcom/bugsnag/android/JsonStream;->out:Ljava/io/Writer;
|
|
|
|
invoke-virtual {v2}, Ljava/io/Writer;->flush()V
|
|
|
|
return-void
|
|
|
|
.end local v1 # "input":Ljava/io/FileReader;
|
|
.restart local v0 # "input":Ljava/io/FileReader;
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/bugsnag/android/IOUtils;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
throw v2
|
|
|
|
.end local v0 # "input":Ljava/io/FileReader;
|
|
.restart local v1 # "input":Ljava/io/FileReader;
|
|
:catchall_1
|
|
move-exception v2
|
|
|
|
move-object v0, v1
|
|
|
|
.end local v1 # "input":Ljava/io/FileReader;
|
|
.restart local v0 # "input":Ljava/io/FileReader;
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public value(Ljava/lang/Boolean;)V
|
|
.locals 1
|
|
.param p1, "value" # Ljava/lang/Boolean;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/bugsnag/android/JsonStream;->nullValue()Lcom/bugsnag/android/JsonWriter;
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
invoke-super {p0, v0}, Lcom/bugsnag/android/JsonWriter;->value(Z)Lcom/bugsnag/android/JsonWriter;
|
|
|
|
goto :goto_0
|
|
.end method
|