62 lines
1.3 KiB
Smali
62 lines
1.3 KiB
Smali
.class public Lcom/thoughtworks/xstream/converters/extended/CharsetConverter;
|
|
.super Lcom/thoughtworks/xstream/converters/basic/AbstractSingleValueConverter;
|
|
.source "CharsetConverter.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/thoughtworks/xstream/converters/basic/AbstractSingleValueConverter;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public canConvert(Ljava/lang/Class;)Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
const-class v0, Ljava/nio/charset/Charset;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public fromString(Ljava/lang/String;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public toString(Ljava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 1
|
|
:cond_0
|
|
check-cast p1, Ljava/nio/charset/Charset;
|
|
|
|
invoke-virtual {p1}, Ljava/nio/charset/Charset;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|