b.smali
.class Lorg/apache/commons/compress/archivers/zip/b;
.super Ljava/lang/Object;
.source "NioZipEncoding.java"
# interfaces
.implements Lorg/apache/commons/compress/archivers/zip/d;
.implements Lorg/apache/commons/compress/archivers/zip/a;
# static fields
.field private static final a:[B
.field private static final b:Ljava/lang/String;
.field private static final c:[C
# instance fields
.field private final d:Ljava/nio/charset/Charset;
.field private final e:Z
# direct methods
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x1
.line 1
new-array v0, v0, [B
const/16 v1, 0x3f
const/4 v2, 0x0
aput-byte v1, v0, v2
sput-object v0, Lorg/apache/commons/compress/archivers/zip/b;->a:[B
.line 2
invoke-static {v1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;
move-result-object v0
sput-object v0, Lorg/apache/commons/compress/archivers/zip/b;->b:Ljava/lang/String;
const/16 v0, 0x10
.line 3
new-array v0, v0, [C
fill-array-data v0, :array_1a
sput-object v0, Lorg/apache/commons/compress/archivers/zip/b;->c:[C
return-void
:array_1a
.array-data 2
0x30s
0x31s
0x32s
0x33s
0x34s
0x35s
0x36s
0x37s
0x38s
0x39s
0x41s
0x42s
0x43s
0x44s
0x45s
0x46s
.end array-data
.end method
.method constructor <init>(Ljava/nio/charset/Charset;Z)V
.registers 3
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lorg/apache/commons/compress/archivers/zip/b;->d:Ljava/nio/charset/Charset;
.line 3
iput-boolean p2, p0, Lorg/apache/commons/compress/archivers/zip/b;->e:Z
return-void
.end method
.method private a()Ljava/nio/charset/CharsetDecoder;
.registers 3
.line 1
iget-boolean v0, p0, Lorg/apache/commons/compress/archivers/zip/b;->e:Z
if-nez v0, :cond_17
.line 2
iget-object v0, p0, Lorg/apache/commons/compress/archivers/zip/b;->d:Ljava/nio/charset/Charset;
invoke-virtual {v0}, Ljava/nio/charset/Charset;->newDecoder()Ljava/nio/charset/CharsetDecoder;
move-result-object v0
sget-object v1, Ljava/nio/charset/CodingErrorAction;->REPORT:Ljava/nio/charset/CodingErrorAction;
.line 3
invoke-virtual {v0, v1}, Ljava/nio/charset/CharsetDecoder;->onMalformedInput(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
move-result-object v0
sget-object v1, Ljava/nio/charset/CodingErrorAction;->REPORT:Ljava/nio/charset/CodingErrorAction;
.line 4
invoke-virtual {v0, v1}, Ljava/nio/charset/CharsetDecoder;->onUnmappableCharacter(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
move-result-object v0
return-object v0
.line 5
:cond_17
iget-object v0, p0, Lorg/apache/commons/compress/archivers/zip/b;->d:Ljava/nio/charset/Charset;
invoke-virtual {v0}, Ljava/nio/charset/Charset;->newDecoder()Ljava/nio/charset/CharsetDecoder;
move-result-object v0
sget-object v1, Ljava/nio/charset/CodingErrorAction;->REPLACE:Ljava/nio/charset/CodingErrorAction;
.line 6
invoke-virtual {v0, v1}, Ljava/nio/charset/CharsetDecoder;->onMalformedInput(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
move-result-object v0
sget-object v1, Ljava/nio/charset/CodingErrorAction;->REPLACE:Ljava/nio/charset/CodingErrorAction;
.line 7
invoke-virtual {v0, v1}, Ljava/nio/charset/CharsetDecoder;->onUnmappableCharacter(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
move-result-object v0
sget-object v1, Lorg/apache/commons/compress/archivers/zip/b;->b:Ljava/lang/String;
.line 8
invoke-virtual {v0, v1}, Ljava/nio/charset/CharsetDecoder;->replaceWith(Ljava/lang/String;)Ljava/nio/charset/CharsetDecoder;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public decode([B)Ljava/lang/String;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-direct {p0}, Lorg/apache/commons/compress/archivers/zip/b;->a()Ljava/nio/charset/CharsetDecoder;
move-result-object v0
.line 2
invoke-static {p1}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/nio/charset/CharsetDecoder;->decode(Ljava/nio/ByteBuffer;)Ljava/nio/CharBuffer;
move-result-object p1
invoke-virtual {p1}, Ljava/nio/CharBuffer;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
.end method