106 lines
2.9 KiB
Smali
106 lines
2.9 KiB
Smali
.class public abstract Lcom/thoughtworks/xstream/io/AbstractDriver;
|
|
.super Ljava/lang/Object;
|
|
.source "AbstractDriver.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/thoughtworks/xstream/io/HierarchicalStreamDriver;
|
|
|
|
|
|
# instance fields
|
|
.field private replacer:Lcom/thoughtworks/xstream/io/naming/NameCoder;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/thoughtworks/xstream/io/naming/NoNameCoder;
|
|
|
|
invoke-direct {v0}, Lcom/thoughtworks/xstream/io/naming/NoNameCoder;-><init>()V
|
|
|
|
invoke-direct {p0, v0}, Lcom/thoughtworks/xstream/io/AbstractDriver;-><init>(Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 3
|
|
iput-object p1, p0, Lcom/thoughtworks/xstream/io/AbstractDriver;->replacer:Lcom/thoughtworks/xstream/io/naming/NameCoder;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createReader(Ljava/io/File;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 4
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/FileInputStream;
|
|
|
|
invoke-direct {v0, p1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
invoke-interface {p0, v0}, Lcom/thoughtworks/xstream/io/HierarchicalStreamDriver;->createReader(Ljava/io/InputStream;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 5
|
|
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 createReader(Ljava/net/URL;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
.locals 1
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-virtual {p1}, Ljava/net/URL;->openStream()Ljava/io/InputStream;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 2
|
|
invoke-interface {p0, p1}, Lcom/thoughtworks/xstream/io/HierarchicalStreamDriver;->createReader(Ljava/io/InputStream;)Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;
|
|
|
|
move-result-object p1
|
|
|
|
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 getNameCoder()Lcom/thoughtworks/xstream/io/naming/NameCoder;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/thoughtworks/xstream/io/AbstractDriver;->replacer:Lcom/thoughtworks/xstream/io/naming/NameCoder;
|
|
|
|
return-object v0
|
|
.end method
|