119 lines
3.4 KiB
Smali
119 lines
3.4 KiB
Smali
.class public Lcom/thoughtworks/xstream/io/json/JsonHierarchicalStreamDriver;
|
|
.super Lcom/thoughtworks/xstream/io/AbstractDriver;
|
|
.source "JsonHierarchicalStreamDriver.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/thoughtworks/xstream/io/AbstractDriver;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0, p1}, Lcom/thoughtworks/xstream/io/AbstractDriver;-><init>(Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createReader(Ljava/io/File;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 4
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v0, "The JsonHierarchicalStreamDriver can only write JSON"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public createReader(Ljava/io/InputStream;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 2
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v0, "The JsonHierarchicalStreamDriver can only write JSON"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public createReader(Ljava/io/Reader;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v0, "The JsonHierarchicalStreamDriver can only write JSON"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public createReader(Ljava/net/URL;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 3
|
|
new-instance p1, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v0, "The JsonHierarchicalStreamDriver can only write JSON"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public createWriter(Ljava/io/OutputStream;)Lcom/thoughtworks/xstream/io/HierarchicalStreamWriter;
|
|
.locals 2
|
|
|
|
.line 2
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/OutputStreamWriter;
|
|
|
|
const-string v1, "UTF-8"
|
|
|
|
invoke-direct {v0, p1, v1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, v0}, Lcom/thoughtworks/xstream/io/json/JsonHierarchicalStreamDriver;->createWriter(Ljava/io/Writer;)Lcom/thoughtworks/xstream/io/HierarchicalStreamWriter;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 3
|
|
new-instance v0, Lcom/thoughtworks/xstream/io/StreamException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public createWriter(Ljava/io/Writer;)Lcom/thoughtworks/xstream/io/HierarchicalStreamWriter;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/thoughtworks/xstream/io/json/JsonWriter;
|
|
|
|
invoke-direct {v0, p1}, Lcom/thoughtworks/xstream/io/json/JsonWriter;-><init>(Ljava/io/Writer;)V
|
|
|
|
return-object v0
|
|
.end method
|